timeStamp to string

64 views
Skip to first unread message

Luigi Ferraris

unread,
Feb 25, 2026, 8:07:54 AMFeb 25
to Harbour Users
Hi friends,
is there a way to transform a timestamp to string using a unique string format?
I know that exist hb_Ttoc( x, <cDateFormat>, <cTimeFormat> ) but it needs two separated strings.
Many thanks in advance for any hints.
Luigi

Maurizio la Cecilia

unread,
Feb 25, 2026, 9:18:27 AMFeb 25
to Harbour User Group
Hi Luigi,

hb_TSToStr( <tTimeStamp> [, <lPacked>] ) ➜ cTimeStamp
returns <cTimeStamp> with the format YYYY-MM-DD hh:mm:ss.fff. If <lPacked> is .T. empty elements of the timestamp will be stripped out.

hb_TtoS( <dDate>|<tTimeStamp> ) ➜ cDateTime
converts a date or timestamp value to string formated as YYYYMMDDHHMMSSFFF.

Best regards. 
--
Maurizio 

--
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
Unsubscribe: harbour-user...@googlegroups.com
Web: https://groups.google.com/group/harbour-users
---
You received this message because you are subscribed to the Google Groups "Harbour Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to harbour-user...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/harbour-users/9facc396-eadb-4c2f-aca0-224fd5392381n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages