Day PowerScript function
Description
Obtains the day of the month in a date value.
Syntax
|
1 |
<span>Day</span> ( <span>date</span> ) |
|
Argument |
Description |
|---|---|
|
date |
A date value from which you want the |
Return Values
Integer. Returns an integer (1 to 31)
representing the day of the month in date. If date is null, Day returns null.
Examples
These statements extract the day (31) from the date
literal 2004-01-31 and set li_day_portion to
that value:
|
1 |
integer li_day_portion |
|
1 |
li_day_portion = <span>Day</span>(2004-01-31) |
These statements check to be sure the date in sle_date is
valid, and if so set li_day_portion to
the day in the sle_date:
|
1 |
integer li_day_portion |
|
1 |
|
1 |
IF IsDate(sle_date.Text) THEN |
|
1 |
li_day_portion = <span>Day</span>(Date(sle_date.Text)) |
|
1 |
ELSE |
|
1 |
MessageBox("Error", & |
|
1 |
"This date is invalid: " & |
|
1 |
+ sle_date.Text) |
|
1 |
END IF |
See Also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest