Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

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

Syntax

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

Description

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

Examples

Inputs

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.

Outputs

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.

Details

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

Examples

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

Related Topics

date
date_to_num
date_to_str


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit