CNVGetTimestampInfo

int CNVGetTimestampInfo (unsigned __int64 timestamp, int *year, int *month, int *day, int *hour, int *minute, double *second);

Purpose

Gets the year, month, day, hour, minute, and second represented by a timestamp. Note that the input timestamp and output data are in Coordinated Universal Time (UTC).

Call CNVGetDataUTCTimestamp to obtain an input timestamp.

Parameters

Input
Name Type Description
timestamp unsigned __int64 The timestamp of a data item in Coordinated Universal Time (UTC).
Output
Name Type Description
year int The year represented by the specified timestamp. The valid range for this output value is from 1601 through 30827.
month int The month represented by the specified timestamp. The valid range for this output value is from 1 (January) through 12 (December).
day int The day represented by the specified timestamp. The valid range for this output value is from 1 through 31.
hour int The hour represented by the specified timestamp. The valid range for this output value is from 0 through 23.
minute int The minute represented by the specified timestamp. The valid range for this output value is from 0 through 59.
second double The second represented by the specified timestamp. The valid range for this output value is from 0 up to but not including 60.

Return Value

Name Type Description
status int Return value indicating whether the function was successful. One indicates that a next item was found, zero indicates that a next item was not found, and a negative number indicates that an error occurred.

You can call CNVGetErrorDescription to obtain a string that describes the error.

Additional Information

Library: Network Variable Library

Include file: cvinetv.h

LabWindows/CVI compatibility: LabWindows/CVI 8.1 and later

Example

Refer to networkvariable\Quality\NVQuality.cws for an example of using the CNVGetTimestampInfo function.

Open example

WAS THIS ARTICLE HELPFUL?

Not Helpful