Joe,

For a datetime value, subtracting the zero hour value of the day will
return the number of seconds.

That is

m.CurrentTimeInSeconds = DATETIME() - DTOT(DATE())

To use it in an Excel sheet as a time value, you must convert it to a
fraction of a day

m.ExcelCurrentTimeInSeconds = m.CurrentTimeInSeconds / 86400

Representing this in Excel in a cell formatted as a time value, will
display something like 18:01:15.


On Mon, Jul 26, 2021 at 5:37 PM Joe Yoder <j...@wheypower.com> wrote:

> I want to build a cursor of time fields for export to Excel.  The DateTime
> format allows a simple for next loop to increment the time value by a
> specified number of seconds.
>
> Is there a function that allows the extraction of the time portion of a
> DateTime variable as a time value not as a string?  It seems one could pull
> out the hours and minutes as characters and convert them to time via CTOT
> but this results in a DateTime result with an embedded date.
>
> Thanks in advance,
>
> Joe
>
>
> --- StripMime Report -- processed MIME parts ---
> multipart/alternative
>   text/plain (text body -- kept)
>   text/html
> ---
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/CADj74tEuL5PFROGeahDPj7zzkViAkwQU1L41QRw=5d65xyt...@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to