Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need YYYYDDD to DATE() function. Anyone?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00468591
Message ID:
00468719
Vues:
16
>>I have a DATE() to YYYYDDD function already but I received a file full of YYYYDDD instead of dates and need to get dates.
>>
>>Does anyone havce a quick algorithm/function already? Before I waste time reinventing the wheel.
>>
>>TIA
>
>How about
>
>
>** cDate - The YYYYDDD date
>LPARAMETER cDate
>nYear = VAL( LEFT(cDate,4) )
>nDay = VAL( RIGHT(cDate,3) )
>dStart = CTOD( "12/31/" + TRAN( nYear - 1) )
>RETURN dStart + nDay
>
>
>OTH

The current date format has to be MDY for this to work. Use DATE( ) instead to create nonambiguous Date values.
Shane Murdoch
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform