Reverse date function

Reverse date function

Postby Guest » Thu Jun 03, 2021 10:34 am

Hi
I have this function in c language that gives the result in d
Is there a way to reverse this function and find date and time from d?

Code: Select all
static DWORD GetVolumeID(void)
{
SYSTEMTIME s;
DWORD d;
WORD lo,hi,tmp;

GetLocalTime(&s);

lo = s.wDay + (s.wMonth << 8);
tmp = (s.wMilliseconds/10) + (s.wSecond << 8);
lo += tmp;

hi = s.wMinute + (s.wHour << 8);
hi += s.wYear;

d = lo + (hi << 16);
return d;
}
Guest
 

Return to Programming and Algorithms



Who is online

Users browsing this forum: No registered users and 2 guests