Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 2017
Operating System: Windows 7 64bit
void get_date_str_ex1()
{
SYSTEMTIME st;
GetSystemTime(&st); // gets current time,
// need to convert to local time
FILETIME ft, ftLocal;
SystemTimeToFileTime(&st, &ft);
FileTimeToLocalFileTime(&ft, &ftLocal);
FileTimeToSystemTime(&ftLocal, &st);
double dDate;
SystemTimeToJulianDate(&dDate, &st);
out_str(get_date_str(dDate, LDF_SHORT_AND_HHMMSS_SEPARCOLON));
}
I can get the current date and time using this function.
How do I calculate the number of seconds that the specified date and time are different from the current date and time?
forum