Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Julian Date Conversion
Message
De
27/01/2003 16:58:21
 
 
À
27/01/2003 15:40:54
Sony Joseph
Dovenmuehle Mortgage Inc
Schaumburg, Illinois, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00745969
Message ID:
00746013
Vues:
19
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform