Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Simplify Converting Format of Character Time
Message
From
31/01/2008 16:12:17
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
31/01/2008 13:12:24
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
Miscellaneous
Thread ID:
01287573
Message ID:
01287696
Views:
11
>This works but something bothers me about using the RIGHT(RIGHT and I think there must be a simplier way.
>
>
>S_ToT = "1515"
>
>m.Result = Ttoc(Ctot(Transform(Dtos(Date()), '@R 9999-99-99') + 'T' + LEFT(RIGHT(STR(S_ToT),4),2) + ':' + RIGHT(RIGHT(STR(S_ToT),4),2)), 2)
>
>m.Result = "03:15:00 PM"
>
Assuming you've already split the value into hours and minutes (0-23, 0-59), here goes:
*-- don't forget to restore these to normal values later.
set hours to 12
set seconds off
m.result=ttoc(datetime(2000,1,1,nHours, nMinutes, 0),2)

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform