nTypeFormat 1–6; default 1.
AdvPL GuideFWTimeStamp([nType],[dDate],[cTime])Formats date and time according to the requested timestamp type.
Types 1 and 2 format date/time; type 3 puts local time into ISO form without converting it to UTC. Types 5 and 6 respectively include timezone and convert to GMT zero; types 4, 5 and 6 consider MV_HVERAO when an environment is open. The official syntax line says NIL, but descriptions and documented use concern a formatted value: the example checks ValType rather than assuming all return types. (Sources: refs. 1–1.)
FWTimeStamp([nType],[dDate],[cTime])nTypeFormat 1–6; default 1.
dDateDate to format.
cTimeTime; default Time().
#Include "Protheus.ch"
User Function Ed452()
Local uStamp := FWTimeStamp(1,SToD("20261027"),"09:30:00")
// Check type and contents on the target release.
ConOut(ValType(uStamp))
ConOut(cValToChar(uStamp))
Return NilDocumented type 1 format: 20261027093000. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
© 2026 Usina.BR. All rights reserved. TOTVS, Protheus, Microsiga and their respective logos are trademarks of their owners. AdvPL Guide is independent and uses limited, attributed excerpts justified by educational purposes. See the Terms of Use. Terms of Use
Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.