$INCLUDE "windowssdk.inc" TYPE DateType UINT LowDW UINT HighDW ENDTYPE UNION uDT UINT64 qVar DateType dtVar ENDUNION uDT u SYSTEMTIME st FILETIME ft INT rtn UINT64 qDAY = 24*60*60*10000000 '1 day in nano seconds 'First get the system time so that all the other structure members are filled GetSystemTime(st) 'Set up the SYSTEMTIME structure with the original date like so: ' st.wDay = 30 ' st.wMonth = 11 ' st.wYear = 2023 PRINT PRINT USING("Original Date = ##/##/####",st.wDay,st.wMonth,st.wYear) ' Convert the system time to file time rtn = SystemTimeToFileTime(st,ft) ' Move the FILETIME info into a UINT64 variable ' and add days using the Quad variable (this is how M$ recommends doing it) u.dtVar.LowDW = ft.dwLowDateTime u.dtVar.HighDW = ft.dwHighDateTime 'Add days using the Quad variable. u.qVar += (qDAY * 1) 'Add 1 day ft.dwLowDateTime = u.dtVar.LowDW ft.dwHighDateTime = u.dtVar.HighDW ' Convert the file time to system time rtn = FileTimeToSystemTime(ft,st) ' Now your new date will be in the SYSTEMTIME structure members PRINT PRINT "Date plus one day" PRINT USING("##/##/####",st.wDay,st.wMonth,st.wYear) PRINT DO:UNTIL INKEY$<>"" CLOSECONSOLE END