Difference between revisions of "DOW()"

From Recital Documentation Wiki
Jump to: navigation, search
 
Line 62: Line 62:
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 +
[[Category:Date and Time Data]]
 +
[[Category:Date and Time Data Functions]]

Revision as of 10:10, 2 June 2009

Class

Date and Time Data


Purpose

Function to return numeric day of the week from a specified date


Syntax

DOW(<expD> | <expT> [,<expN>])


See Also

AMPM(), CDOW(), CMONTH(), CTOD(), CTOT(), DATE(), DATETIME(), DAY(), DAYS(), DMY(), DTOC(), DTOM(), DTOS(), DTOV(), ELAPTIME(), EPOCH(), GOMONTH(), HOUR(), HOURS(), MDY(), MINUTE(), MINUTES(), MONTH(), MTOD(), QUARTER(), SEC(), SECONDS(), SECS(), SET CENTURY, SET DATE, SET EPOCH, SET HOURS, SET MARK, SET SECONDS, SET VAXTIME, STOD(), TIME(), TIMESTAMP(), TSTRING(), TTOC(), TTOD(), VALIDTIME(), VTOD(), WEEK(), YEAR()


Description

The DOW() function returns a number representing the day of the week from the given date expression <expD> or datetime expression <expT>.


Return Value Day of Week
1 Sunday
2 Monday
3 Tuesday
4 Wednesday
5 Thursday
6 Friday
7 Saturday


The optional <expN> is used to specify an alternative first day of the week.


Example

set date american
? dow({02/29/2004})
         1
? dow({02/29/2004},2)
         7
store dow({02/29/2004}) to dayofweek
? dayofweek
         1
dayofweek = dow({02/29/2004 11:35:27 A.M.})
? dayofweek
         1


Products

Recital Database Server, Recital Mirage Server, Recital Terminal Developer