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

datestr (MathScript Function) (Windows, Not in Base Package)

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Member of the time class.

Syntax

s = datestr(n)

s = datestr(n, dateform)

s = datestr(s1, dateform)

s = datestr(v, dateform)

s = datestr(s1, dateform, pivotyear)

Description

Converts a time in any supported format to a string. s = datestr(s1, dateform) is equivalent to s= datestr(s1, dateform, -1).

Examples

Inputs

Name Description
n Specifies a time in floating-number format.
dateform Specifies the format for the output string. dateform is a string.
s1 Specifies a time in string format.
v Specifies a time in vector format.
pivotyear Provides additional information about the century if you use the form yy in s1. If pivotyear is less than 0, LabVIEW considers s to be a time in the current century.

Outputs

Name Description
s Returns the time as a string in the dateform format.

Examples

% S = datestr(s1, dateform, pivotyear)
S = datestr('18-Oct-04', 'yyyy/mm/dd', 1900)

% S = datestr(s1, dateform)
S = datestr('18-Oct-04', 'yyyy/mm/dd')

% S = datestr(v, dateform)
S = datestr([2004, 10, 18, 0, 0, 0] , 'yyyy/mm/dd')

% S = datestr(n, dateform)
S = datestr(2, 'yyyy/mm/dd')

Related Topics

date
datenum
datevec


Resources


 

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