Admin Production ni-theme
Current Publication

GetCurrentDateTime

LabWindows/CVI

GetCurrentDateTime

int GetCurrentDateTime (double *outputDateTime);

Purpose

Gets the current date/time. This function returns the number of seconds since midnight, January 1, 1900 in the local time zone. You can use this output as an input to FormatDateTimeString and GetDateTimeElements.

Refer to the FormatDateTimeString function reference for an example of how to use this and other time-related functions to format the current date/time into a string.

Parameters

Output
Name Type Description
outputDateTime double The number of seconds since midnight, January 1, 1900 in the local time zone to the current date/time.

Return Value

Name Type Description
status int Return value indicating whether the function was successful. A negative number indicates that an error occurred.

Additional Information

Library: User Interface Library

Include file: userint.h

LabWindows/CVI compatibility: LabWindows/CVI 8.0 and later

Example

Refer to udp\UDPChat.cws for an example of using the GetCurrentDateTime function.