searching a routine to convert date number in normal format date 
Author Message
 searching a routine to convert date number in normal format date

Hello,

I'm searching a routine to convert a system date number (number of days
since 31th december 1899) in a normal format (mm/dd/yy or something like
that) written in basic or Pascal.

Thanks



Sun, 26 Sep 1999 03:00:00 GMT  
 searching a routine to convert date number in normal format date

Quote:

>Hello,

>I'm searching a routine to convert a system date number (number of days
>since 31th december 1899) in a normal format (mm/dd/yy or something like
>that) written in basic or pascal.

>Thanks

Hi,

If I've got the correct the date is stored in bits like this:
    yyyyyyymmmmddddd

Unless you're BASIC can access unsigned integers you'll have
to store the value in a DOUBLE variable and work it down from
there

SysDate& = ....

Year%  = ( ( SysDate& \ 512 ) + 1980 )
Month% = ( ( SysDate& \  32 ) AND 15 )
Day%   = ( SysDate& AND 31 )

  ____    _    ____      ____  _____
 |  _ \  / \  / ___) __ | ___)(_   _)
 | |_)  / _ \ \____\/  \|  _)   | |
 |____//_/ \_\(____/\__/|_|     |_|

     www.basicguru.com/schullian



Mon, 27 Sep 1999 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. convert Full date from minutes to normal date format

2. How to convert number format to date format

3. Converting Julian Date to Long Date

4. Code to Convert Medium Date to Short Date

5. Function to convert date() to Julian date

6. How to convert 4 byte date to 8 byte date

7. Convert date serial to a date data type

8. How to convert DATE to JULIAN DATE?

9. How to convert DATE to JULIAN DATE?

10. Converting Julian dates to Calender dates.

11. Convert date to short date in formula editor

12. Converting %date% %time% to VB Time/Date

 

 
Powered by phpBB® Forum Software