Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Converting weird date format
Message
 
À
03/09/1997 10:57:22
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00048265
Message ID:
00048280
Vues:
22
>>>>One section of the data contains the date in the following format YYYDDD where YYY is the year (097) and DDD is the day number of the current year (245). I'm quite familiar with VFP's date functions and have converted form a number of formats in the past, but this one has me stumped. Unless I have completely missed it, I don't know of a "day of year" function in VFP.
>>>
>>>What about about 245 + the first day of the year which will give you the current date for 245th day.
>>
>>Yea, that makes sense. Since I have the year, I ll use the date functions to create an extra field that contains the first day of the year and add the number of days from the DDD portion to this field to come up with the current date in the format I require. I should have thought of this myself. Thanks for the response.
>
>To having double replacements, you may want to store this to a memory variable and only replace the final value. :)

I could do that but this is a temporary table that has a few extra fields already so it is not an issue. Once I have sliced and diced the records from this daily table, I append the fields I require to a much larger "archive" table.

On another matter, do you know if people attending DevCon are supposed to receive any materials before the conference? I paid for the conference back in mid-July.

AL
Al Williams

Anola MB, CANADA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform