Difference between revisions of "DOW()"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
Line 1: Line 1:
 
==Purpose==
 
==Purpose==
 
Function to return numeric day of the week from a specified date
 
Function to return numeric day of the week from a specified date
 
  
 
==Syntax==
 
==Syntax==
 
DOW(<expD> | <expT> [,<expN>])
 
DOW(<expD> | <expT> [,<expN>])
 
  
 
==See Also==
 
==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()]]
+
[[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]], [[STOD()]], [[TIME()]], [[TIMESTAMP()]], [[TSTRING()]], [[TTOC()]], [[TTOD()]], [[VALIDTIME()]], [[VTOD()]], [[WEEK()]], [[YEAR()]]
 
+
  
 
==Description==
 
==Description==
 
The DOW() function returns a number representing the day of the week from the given date expression <expD> or datetime expression <expT>.
 
The DOW() function returns a number representing the day of the week from the given date expression <expD> or datetime expression <expT>.
 
  
 
{| class="wikitable"
 
{| class="wikitable"
Line 33: Line 29:
 
|-
 
|-
 
|}
 
|}
 
  
 
The optional <expN> is used to specify an alternative first day of the week.
 
The optional <expN> is used to specify an alternative first day of the week.
 
  
 
==Example==
 
==Example==
Line 53: Line 47:
 
</code>
 
</code>
  
 
==Products==
 
Recital Server, Recital
 
 
[[Category:Documentation]]
 
[[Category:Documentation]]
 
[[Category:Functions]]
 
[[Category:Functions]]
 
[[Category:Date and Time Data]]
 
[[Category:Date and Time Data]]
 
[[Category:Date and Time Data Functions]]
 
[[Category:Date and Time Data Functions]]

Revision as of 08:05, 25 November 2011

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, 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