>>NOTE
Date is stored as a 3-byte binary string in the following format:
Offset 0: Year based from 1900 (i.e., year-1900)
Offset 1: Month (1-12)
Offset 2: Day (1-31)
Time is stored as a 3-byte binary string in the following format:
Offset 0: Hours (0-23)
Offset 1: Minutes (0-59)
Offset 2: Seconds (0-59)
>>IMPORTANT NOTE For Clipper and FoxPro users:
Offsets are listed
above from base 0 (i.e., the first byte is #0). However, the
SUBSTR() function uses offsets from base 1. Thus, the starting
SUBSTR value is the offset+1. See the example below.
>>RESOLUTION/FIX:
>>EXAMPLE(S):
* Get Smith's grace login count.
* Notice that the SUBSTR() offset is the byte offset + 1
cPropVal = N_B_PRREAD("SMITH",1,"LOGIN_CONTROL")
IF !EMPTY(cPropVal)
nGrace = ASC(SUBSTR(cPropVal,8,1))
ENDIF
>>SEE ALSO:
File LOGINDAT.PRG in the snippets section of NetLib gives an
example of extracting the last login date and time from the
LOGIN_CONTROL property
>>COPYRIGHT 1997 Communication Horizons
All rights reserved worldwide.
No distribution without specific consent of publisher.
Knowledgebase
Top Home