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:
00469031
Vues:
12
Hi Alex

Here is my Period (yyyymmdd) to date function.

Simon White
LParameter lcPeriod
Local ldDate
Do Case
Case Empty(lcPeriod).Or.PCount()=0
   ldDate=TTOD({--,:})
Case Len(lcPeriod)=4
   ldDate=TToD(DateTime(Val(Left(lcPeriod,4)),1,1))
Case Len(lcPeriod)=6
   ldDate=TToD(DateTime(Val(Left(lcPeriod,4)),Val(SubStr(lcPeriod,5,2)),1))
Otherwise
   ldDate=TToD(DateTime(Val(Left(lcPeriod,4)),Val(SubStr(lcPeriod,5,2)),Val(Right(lcPeriod,2))))
EndCase   
Return ldDate
Simon White
dCipher Computing
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform