TolliumUser::FormatDateTime (open)

Format a given UTC date and time according to the user's preferences

Syntax

LOADLIB "mod::tollium/lib/users.whlib";

STRING FUNCTION FormatDateTime(DATETIME value, STRING precision, BOOLEAN stored_utc, BOOLEAN shortformat)

Parameters

DATETIME value

The date and time to format

STRING precision

Use either "milliseconds", "seconds" or "minutes"

BOOLEAN stored_utc

True if the datetime is stored in UTC and should be converted to the user's local time

BOOLEAN shortformat

True for the short date format (numerical month instead of month name)

Return value

STRING

The formatted date and time

Description

First, the given DATETIME value is converted to the user's local date and time, then it is formatted using the user's dateformat and timeformat settings.