Skip to main content

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

ParameterRequiredTypeDefaultDescription
dTimeTrueexpressiondTimeThe time when the data is obtained
sFormatTruestring"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"
*/