>>ITEM: N01027
>>DATE: Dec 2, 1998
>>TYPE: Information
>>TITLE: N_T_DATE and N_T_TIME return numerics in FoxPro DOS
>>PRODUCT(S):
NetLib 2.5x for FoxPro DOS
>>PLATFORM(S):
Microsoft Networking
>>SUMMARY:
The functions N_T_DATE and N_T_TIME, found in NETLIB3.PLB, return
integer data types. N_T_DATE returns the number of days since
January 1, 1900. N_T_TIME returns seconds since 00:00 (12 am).
>>MORE INFORMATION:
This was done to reduce the memory overhead, which is most
critical in the DOS environment. Doing so allowed us to omit the
floating point emulation software from the PLB which reduced the
memory overhead by more than 20K.
>>RESOLUTION/FIX:
To convert the value returned by N_T_DATE to a Date variable, use
this UDF:
FUNCTION NTDATE PARAMETER ds1900 && days since 1900 RETURN {01/01/1900} + ds1900
To convert the value returned by N_T_TIME to a character time
string, use this UDF:
FUNCTION NTTIME PARAMETER ss12 && seconds since 00:00 PRIVATE s, m s = MOD(ss12,60) && extract seconds ss12 = INT(ss12/60) m = MOD(ss12,60) && extract minutes ss12 = INT(ss12/60)*10000 + m*100 + s RETURN TRANSFORM(ss12,"99:99:99")
>>SEE ALSO:
>>COPYRIGHT 1998 Communication Horizons
All rights reserved worldwide.
No distribution without specific consent of publisher.
Knowledgebase
Top Home