Returns a new date object set to current or specified date/time.
Syntax
Date( )
Date( string )
Date( milliseconds )
Date( year , month , day )
Date( year , month , day , hour , minutes , seconds )
Parameters
string
|
string representation of a date in yyyy-mm-dd hh-mm-ss format.
|
year
|
the year.
|
month
|
the month.
|
day
|
day of month.
|
hour
|
the hour.
|
minutes
|
the minutes.
|
seconds
|
the seconds.
|
Returns
date
|
the new date object.
|
Notes
If parameters are not specified the current date is returned.
Example
today = Date( )
tomorrow = Date( today + 1 )
iDate = Date( 1997, 12, 31 )
iDate = Date( 1997, 12, 31, 10, 30, 0 )
iDate = Date( "1997-12-31 10:30:00" )
|