Measurement Studio does not have a function for this, but you can do
this yourself by first converting from LV epoch (1/1/1904) to Unix
epoch(1/1/1970) and then using c runtime time functions
UNIXEpochOffset is the difference between the 2 epochs at GMT. To
convert to a UNIX system clock value, just subtract the sum of this
number and your time zone offset in seconds
lvTime is the value returned by LV timestamp
#define UNIXEpochOffset 2082844800
int _tmain(int argc, _TCHAR* argv[])
{
__int64 lvTime = 3214396284; //10:48:13.173 AM 11/9/2005
//GMT offset for Central Time is -6 (3600 seconds). You will need to account for daylight savings time.
int offset = -3600;
time_t unixTime = lvTime - UNIXEpochOffset - offset;
struct tm *newtime = localtime(&unixTime);
printf(asctime( newtime )); //prints out the time in a string format.
return 0;
}
Bilal Durrani
NI