date_to_vector (MathScript RT Module Function)

LabVIEW 2012 MathScript RT Module Help

Edition Date: June 2012

Part Number: 373123C-01

»View Product Info
Download Help (Windows Only)

Owning Class: time

Requires: MathScript RT Module


v = date_to_vector(s, pivotyear)

v = date_to_vector(s)

v = date_to_vector(n)

[y, m, d, h, mi, se] = date_to_vector(s, pivotyear)

[y, m, d, h, mi, se] = date_to_vector(s)

[y, m, d, h, mi, se] = date_to_vector(n)

Legacy Name: datevec


Converts a time from a string or a double-precision, floating-point number to a vector.



Name Description
s Specifies a time. s is a string.
pivotyear Provides information about the century if you use the form yy in s. If you specify a pivotyear, LabVIEW considers s to be a time in pivotyear or the 99 years that follow pivotyear. For example, the result of date_to_vector('18-Oct-04', 1900) is equivalent to the result of date_to_vector('18-Oct-1904'). However, if you do not specify pivotyear, or if pivotyear is less than 0, LabVIEW considers s to be within a century centered on the current year, or the current year plus or minus 50 years. For example, the result of date_to_vector('18-Oct-04') is equivalent to the result of date_to_vector('18-Oct-2004').
n Specifies a time. n is a scalar, vector, or matrix of double-precision, floating-point numbers.


Name Description
v Returns the time. v is a vector.
y Returns the year.
m Returns the month.
d Returns the day.
h Returns the hour.
mi Returns the minute.
se Returns the second.


The following table lists the support characteristics of this function.

Supported in the LabVIEW Run-Time Engine Yes
Supported on RT targets Yes
Suitable for bounded execution times on RT Not characterized


s = '05-Apr-06';
v = date_to_vector(s)

Related Topics



Not Helpful