DateValue

From NSB App Studio
Revision as of 02:55, 4 July 2012 by Brendon (talk | contribs) (Created page with "DATEVALUE(''date'') '''Description''' DATEVALUE returns a date. The required parameter, date, is usually a string, but any expression that can represent a date, a time, or a...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

DATEVALUE(date)

Description

DATEVALUE returns a date. The required parameter, date, is usually a string, but any expression that can represent a date, a time, or a date and time ranging from January 1, 100 to December 31, 9999, can be used.

If date is a string that consists of numbers separated by date separators, it recognizes the order for month, day, and year according to the Short Date format specified for your system. If the year is left out of date, the current year is used. Unambiguous month names as strings will be recognized in either long or abbreviated form.

Date separators are characters that separate day, month, and year when a date is formatted as a string, they are determined by your system settings.

Example

REM DATEVALUE Example
'DATEVALUE returns a date
DIM IndepDay, Birthday
IndepDay = DATEVALUE("July 4, 1776")
Birthday = DATEVALUE("Dec 27 1970")
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

FORMAT, TIMEVALUE