FormatDateTimeToString


Returns a string containing date and time information in selected format.

Syntax

C++
Python
 
def FormatDateTimeToString(
	inDateTime: DateTime,
	/,
	*,
	inFormat: str = "\"%x %X\"",
	inDecimalPlaces: int = 0,
	inLocale: str = ""
)
-> outString: str

Parameters

Name Type Range Default Description
Input value inDateTime DateTime Date and time with timezone offset
Input value inFormat str "\"%x %X\"" Date and time format to use
Input value inDecimalPlaces int 0 - 9 0 Number of decimal places to use when printing seconds
Input value inLocale str "" Locale to use when converting
Output value outString str Date and time converted to string