Format-Time
Command Description
Transform the obtained time into the specified form of string. (The time can be obtained by using the Get Time command.)
Command Prototype
sRet = Time.Format(dTime,sFormat)
Parameter Description
Parameter | Required | Type | Default | Description |
---|---|---|---|---|
dTime | True | expression | dTime | The time when the data is obtained |
sFormat | True | string | "yyyy-mm-dd hh:mm:ss" | Format string |
return
sRet,The variable used to save the output of the command.
Demo
Dim sRet
sRet = Time.Format(44601.61681713,"yyyy-mm-dd hh:mm:ss")
TracePrint (sRet)
/**
sRet = "2022-02-09 14: 48: 13"
*/