Formatting

Function

Description

uFormatDate

Returns a user defined string with date information.




uFormatDate

Description

Returns a user defined string with date information. See Usage below for a list of special escape sequences in the format string will be replaced by the referring date part.

Syntax

number uFormatDate(format, modifiers, ...)

Parameters

string format

A format specification for the return string

string modifiers (optional)

List of strings specifying a date or date calculation. Default is the now modifier.

Examples

Example 1

Create a string from a date

uFormatDate("Today is %A the %d of %B in %Y", "now")
//returns something like "Today is Thursday the 10 of
February in 2005"

Usage

The function uFormatDate returns a user defined string with date information. Special escape sequences in the format string will be replaced by the referring date part.


Escape sequences

Escape sequence

Returns

%A

Weekday name

%a

Weekday name short

%B

Month name

%b

Month name short

%d

Day of month

%f

fractional seconds SS.SSS

%H

Hour 00-24

%j

Day of year 000-366

%J

Julian day number

%m

Month

%M

Minute

%s

Seconds since 1970-01-01

%S

Seconds 00-59

%w

Day of week 0-6, 0=Sunday

%W

Week of year

%Y

Year 0000-9999

%%

%