DateSerial: Difference between revisions

From NSB App Studio
Jump to navigation Jump to search
Brendon (talk | contribs)
Created page with "DATESERIAL(''year'', ''month'', ''day'') '''Description''' DATESERIAL returns a date constructed from a given year, month, and day. The required parameter, ''year'', is any ..."
 
Brendon (talk | contribs)
No edit summary
Line 1: Line 1:
DATESERIAL(''year'', ''month'', ''day'')
DateSerial(''year'', ''month'', ''day'')


'''Description'''
== Description ==


DATESERIAL returns a date constructed from a given year, month, and day. The required parameter, ''year'', is any numeric expression ranging from 100 to 9999. The required parameters, ''month'' and ''day'', can be any numeric expression.
DateSerial returns a date constructed from a given year, month, and day. The required parameter, ''year'', is any numeric expression ranging from 100 to 9999. The required parameters, ''month'' and ''day'', can be any numeric expression.


'''Example'''
== Example ==


<pre>
<pre>
REM DATESERIAL Example
REM DateSerial Example
'DATESERIAL builds a date from its parts
'DateSerial builds a date from its parts
DIM IndepDay, Birthday
DIM IndepDay, Birthday
IndepDay = DATESERIAL(1776, 7, 4)
IndepDay = DateSerial(1776, 7, 4)
Birthday = DATESERIAL(1970, 12, 27)
Birthday = DateSerial(1970, 12, 27)
PRINT "Independence Day:", IndepDay
PRINT "Independence Day:", IndepDay
PRINT "My birthday:", Birthday
PRINT "My birthday:", Birthday
</pre>
</pre>


'''Output'''
== Output ==


<pre>
<pre>
Line 25: Line 25:
</pre>
</pre>


'''Related Items'''
== Related Items ==


[[timeserial|TIMESERIAL]]
[[timeserial|TIMESERIAL]]
[[Category:Language Reference]]

Revision as of 20:45, 8 August 2012

DateSerial(year, month, day)

Description

DateSerial returns a date constructed from a given year, month, and day. The required parameter, year, is any numeric expression ranging from 100 to 9999. The required parameters, month and day, can be any numeric expression.

Example

REM DateSerial Example
'DateSerial builds a date from its parts
DIM IndepDay, Birthday
IndepDay = DateSerial(1776, 7, 4)
Birthday = DateSerial(1970, 12, 27)
PRINT "Independence Day:", IndepDay
PRINT "My birthday:", Birthday

Output

Independence Day:    7/4/1776
My birthday:  12/27/1970
(''sample date output is machine dependant'')

Related Items

TIMESERIAL