Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Julian Date Conversion
Message
From
27/01/2003 16:58:21
 
 
To
27/01/2003 15:40:54
Sony Joseph
Dovenmuehle Mortgage Inc
Schaumburg, Illinois, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00745969
Message ID:
00746013
Views:
18
Do you really want YYYYDDD where DDD is actually the day of the year? i.e. 001 -> 365 (or 366) Is 2003001 = to January 1st, 2003?

I know that many non-computer / non-mathematicians refer to this as a Julian date, even through it's not really.

If 2003001 is a numeric (say lnJulian), then to get a VFP date, try:
?date(int(lnJulian/1000), 1, 1) + mod(lnJulian, 1000) - 1

If 2003001 is a character string (say lcJulian), then to get a VFP date, try:
?date(val(left(lcJulian, 4)), 1, 1) + val(right(lcJulian, 3)) - 1

Rick

>Hi,
>
>I have a julian date that I need to convert into VFP date format.
> Does anyone know the command to do it? I checked Sys(10) & Sys(11). They don't seem to help..
>julian date looks like this. 2003001
>
>TIA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform