|
DateFormat()
Converts a date into a string of a particular
format.
Syntax
DateFormat(<dDate>, <nType>,
[<cBracket>]) --> cDateString
Arguments
<dDate> --> is the date field to
format.
<nType> --> is the number of the
formatting to apply to the date. See the table below for more
details.
<cBracket> is the bracket character
to use which separates the day, month and year components of the
date. This should be a character or symbol. For example: / : -
.
Numbers cannot be used as symbols.
If not specified the forward slash (/)
symbol is used by default.
Returns
Returns a new character string based on the
specified date format.
Description
This function accepts a date and formats it
for presentation based the type of formatting specified. It can be
used to convert an Australian date into the date format of another
country, such as US or Japanese.
|
Type
|
Formatting
|
Example
|
|
1
|
dd/mm/yy
|
01/05/02
|
|
2
|
dd/mm/yyyy
|
05/09/2003
|
|
3
|
mm/dd/yy
|
10/30/02
|
|
4
|
mm/dd/yyyy
|
08/25/2002
|
|
5
|
yy/mm/dd
|
02/12/27
|
|
6
|
yyyy/mm/dd
|
2002/04/30
|
|
7
|
dd/mon/yy
|
01/Jan/02
|
|
8
|
dd/mon/yyyy
|
18/Apr/2002
|
|
9
|
day, number, month, year
|
Saturday, 7th of September 2002
|
Examples
DateFormat(Invoice->Date, 4, '-')
DateFormat(Sorders->Sodate, 5, '.')
DateFormat(Today(),
9)
____________________________
Related Topics
Business
Function List
|