Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Simple problems
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Titre:
Divers
Thread ID:
00204417
Message ID:
00204789
Vues:
29
Hi Jim:

Thanks a lot for your answer, I hope, it will help me.

>>> Craig is right: you can get the 12 hour format with a simple SET command, and you can get rid of the seconds with SET SECONDS.
>>
>> Do these settings influence on the character string (time) which returns by adir() function, do you know? Or I still need to convert this string in the right format?
>>
>No they don't affect character strings. You can convert the date and time strings to a datetime value though;
>
>* lcDate assumed to be MM/DD/YYYY
>* lcTime assumed to be HH:MM:SS


Great, but, honestly, I have date in date format (adir() returns file modification date in date format), i.e. ldDate and time in character lcTime, so do I need to convert my ldDate into lcDate first by using dtoc() in order to use your function?

>
>ltDateTime = EVAL("{^"+RIGHT(lcDate,4)+"/"+LEFT(lcDate(5)+" " + lcTime +"}")
>
>Now that you have a datatime value you can show it in one textbox with SET HOURS TO 12

Thanks. But actually what I want just display in my Report file modification date and time. I already have 2 fields in my output table: FDateCreate (D) and FTimeCreate (C 10). Sure, I can add a new field FDateTimeCreate (T), change my program and use your function, but probably there is an easier way. What do you think?
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform