The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Sergiu FUNIERU on March 02, 2010, 02:19:20 AM

Title: How to get the current day into a string
Post by: Sergiu FUNIERU on March 02, 2010, 02:19:20 AM
I'm trying to get the current day into a string.
I read about this:
DateTimeToDateString
This procedure converts a DATETIME to a date only string in the system's default date format.
Usage:
  INVOKE DateTimeToDateString, pdt, pszDate
    pdt is a pointer to the DATETIME [IN]
    pszDate is a pointer to an ASCIIZ string [OUT]
    Returns a PTR BYTE in eax:
      a pointer to the resulting string on success, NULL on error

but I don't know how to create an ASCIIZ string.

I believe it's something like:
my_date[128]:BYTE
but how do I end it with a zero?
Title: Re: How to get the current day into a string
Post by: dedndave on March 02, 2010, 03:06:22 AM
the resulting string will already be terminated with a 0 byte
Title: Re: How to get the current day into a string
Post by: GregL on March 03, 2010, 07:18:39 PM
Sergiu,

There is a help file for the DateTime Library located here: c:\masm32\help\DateTime.chm.  On second thought, I guess that's probably where you read that.  :bg