Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I only want the time portion of datetime
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00337170
Message ID:
00337225
Views:
11
Mark,

Use the optional second argument to the ttoc() function

? ttoc({^2000-02-25 11:55}, 2) && prints 11:55

BTW, the other option for the second argument returns a string that can be used to build indexes (like dtos())

? ttoc({^2000-02-25 11:55}, 1) && prints 20000225115500

Interestingly, the Hackers Guide doesn't mention the optional arguments to this function, while MSDN help does (haven't checked FoxHelp.chm, but I expect it's the same as the MSDN version)

Cheers,

Andrew


>>>I am trying to do time math and VFP tacks on an implicit 12/30/1899 date to the beginning of all my times.
>>
>>What are you doing that doesn't require a date?
>
>Start Time, Current Time, Estimated Completion Time display to a user importing data. It is not an all day deal [maybe 90 minutes max] so the date is superfluous.


If we were to introduce Visual FoxBase+, would we be able to work from the dotNet Prompt?


From Top 22 Developer Responses to defects in Software
2. "It’s not a bug, it’s a feature."
1. "I thought I fixed that."


All my FoxTalk and other articles are available on my web site.


Unless specifically identified otherwise, anthing posted here is purely my opinion and may or may not reflect the policies or practices of Microsoft.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform