Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

date_to_vector (MathScript RT Module Function)

LabVIEW 2010 Help

Edition Date: June 2010

Part Number: 371361G-01

»View Product Info

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.

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