/*
Hello,

I am new to asm, i started with VB, Delphi and then C++

Now i wonder if there is an easy function to calculate the difference between two given dates ?
I looked at all the masm32 tutorials but couldnt find anything about date and time.

Thanks */
Posted on 2003-08-15 00:52:56 by Ranma_at
Im sure it depends on format of your dates

from Win32 reference

The SYSTEMTIME structure represents a date and time using individual members for the month, day, year, weekday, hour, minute, second, and millisecond.

typedef struct _SYSTEMTIME { // st
WORD wYear;
WORD wMonth;
WORD wDayOfWeek;
WORD wDay;
WORD wHour;
WORD wMinute;
WORD wSecond;
WORD wMilliseconds;
} SYSTEMTIME;

The FILETIME structure is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601.

typedef struct _FILETIME { // ft
DWORD dwLowDateTime;
DWORD dwHighDateTime;
} FILETIME;


I hope simple CMPs or MASM high level sintax will work fine

FILETIME STRUCT ; this is already defined in hutch's WINDOWS.INC
dwLowDateTime DWORD ?
dwHighDateTime DWORD ?
FILETIME ENDS

.if FILETIME1.dwLowDateTime > FILETIME2.dwLowDateTime ; or may use && instead of 2 .if
.if FILETIME1.dwHighDateTime > FILETIME2.dwHighDateTime
your code
.endif
.endif
Posted on 2003-08-15 01:35:16 by S.T.A.S.
ok
i know now where to start....
Posted on 2003-08-15 03:45:16 by Ranma_at