To change the default presentation used in ?
, SAY
, GET
etc.:
SET DATE german // Formatos pré definidos, legado
SET DATE FORMAT TO dd/mm/yyyy // Formato customizável (pré processador)
Set( _SET_DATEFORMAT, 'dd/mm/yyyy' ) // Formato customizável (nativo)
Handbook: https://harbour.github.io/doc/harbour.html#set-date-cmd
To generate a formatted string:
hb_DToC( dData, cFormato )
Example:
? hb_DToC( 0d20210531, 'DD~MM~YYYY' )
Exit:
31~05~2021
If you want the same for a timestamp:
hb_TToC( tTimestamp, cFormatoData, cFormatoTempo )
For lack of detailed documentation, follow the official implementation: