DayNumber
PowerScript function
Description
Determines the day of the week of a date value and returns the
number of the weekday.
Syntax
|
1 |
DayNumber ( date ) |
|
Argument |
Description |
|---|---|
|
date |
The date value from which you want the number of the day |
Return value
Integer.
Returns an integer (1-7) representing the day of the week of date.
Sunday is day 1, Monday is day 2, and so on. If date is null, DayNumber
returns null.
Examples
These statements evaluate the date literal 2000-01-31 and set
day_nbr to 4 (January 31, 2000, was a Wednesday):
|
1 2 |
integer day_nbr day_nbr = DayNumber(2000-01-31) |
These statements check to be sure the date in sle_date is valid, and
if so set day_nbr to the number of the day in the sle_date:
|
1 2 3 4 5 6 7 8 9 |
integer day_nbr IF IsDate(sle_date.Text) THEN day_nbr = DayNumber(Date(sle_date.Text)) ELSE MessageBox("Error", & "This date is invalid: " & + sle_date.Text) END IF |
See also
DayNumber method for DataWindows in the section called “DayNumber” in DataWindow Reference.
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest