Equinox Online Help - Language Reference - A to Z

Home

StrDate

Applies to
SyntaxStrdate(DateExpression, FormatExpression)
Action[Function] Returns a date string.
ScopeUsable anywhere.
Notes

This function returns DateExpression in a string format. FormatExpression is a string comprising style identifiers that format the returned string. FormatExpression recognises the following identifiers.

IdentifierItem(style)
%nthDay(1st, 2nd, 24th)
%d or %0dDay(1, 2, 24 or 01, 02, 24)
%day or %DAYDay(Monday, Tuesday or MONDAY, TUESDAY)
% dy or %DYDay(Mon, Tue or MON, TUE)
%m or %0mMonth(1, 2, 12 or 01, 02, 12)
%mon or %MONMonth(Jan, Feb or JAN, FEB)
%month or %MONTHMonth(January, February or JANUARY, FEBRUARY)
%y or %0yYear(9, 92 or 09, 92)
%Year or %YEARYear(1992)

You may include any of these identifiers in FormatExpression. Any other characters appearing in FormatExpression, or any characters preceded by a back-slash, are added to the returned string.

CategoryConversions
See Also Asc, Card, ChoosePrinter, HexNum, HexStr, Lowercase, Ord, Str, StrCase, StrTime, Uppercase
Example

In the following examples, the comments show what is printed (in the Print window) by each statement.

date LaunchDate

LaunchDate = '24-08-95'

| THURSDAY 24th AUGUST 1995
Print StrDate(LaunchDate, "%Day %nth %Month %Year")

| 1995AD
Print StrDate(LaunchDate, "%YEARAD")

| 8th Month
Print StrDate(LaunchDate, Card(Month(LaunchDate)) & " Month")