The MASM Forum

General => The Campus => Topic started by: ragdog on November 11, 2013, 12:48:31 AM

Title: Date convert to SYSTEMTIME struct
Post by: ragdog on November 11, 2013, 12:48:31 AM
Hello all

I coding a Backup mananger this copy files to a other drive via Date Day,Month,Year

Via commandline

example:

BackupManager.exe 10/11/2013 d:\backupfolder

How i can convert this date string to the SYSTEMTIME struct

Gives a better solution or example?

I search here on board without good result
Title: Re: Date convert to SYSTEMTIME struct
Post by: dedndave on November 11, 2013, 02:04:50 AM
fortunately, you only need the wYear, wMonth, and wDay members
you can set all the other members of the structure to 0

but - you just have to write a little parser that picks out the 3 ASCII numbers and converts them to binary
you need a little logic for the year
if the user enters 99 or 1999, you want 1999 (binary)
if the user enters 13 or 2013, you want 2013 (binary)