Return formatted date/time output for the given date/time values, this function does emulate the C/C++ time function strftime(), it takes your desired date/time values and the arguments required for formatting and returns the result in a new string.
Note that it works only for date/times in the following range:
minimum (QB64 32/64-bit)
- <Tue Jan 01 00:00:00 1970 UTC>
maximum (QB64 32-bit)
- <Tue Jan 19 03:14:07 2038 UTC>
maximum (QB64 64-bit)
- <Thu Jan 01 07:59:59 3001 UTC>
these limitations are imposed by the strftime() implementation.
SYNTAX:
formatted$ = StrFGivenTime$ (fmt$, year%, month%, day%, hour%, minute%, second%)
INPUTS:
fmt$ (STRING)
- Any string literal or variable, which can contain any escape sequences known to C/C++ and formatting tokens known to the standard library function strftime().
date/time values (INTEGERs)
- As usual, year% must be 4 digit, hour% in 24 hours notation.
RESULT:
formatted$ (STRING)
- The new formatted string, ie. all formatting tokens in the given format string (fmt$) have been replaced with the respective data from the given date/time parameters
ERRORS:
- If fmt$ is empty or contains unsupported formatting tokens, or if the date/time is out of the supported range, then this function will return an empty string.