The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: squares on December 29, 2008, 09:44:22 PM

Title: DateTime & DateDiff
Post by: squares on December 29, 2008, 09:44:22 PM
Hello everybody,
Where can I find DateTime.inc, DateTime.lib, DateDiff.inc and DateDiff.lib?
I can't find them anywhere in my include or lib directories.

Thanks very much for any assistance you can provide!

- Gordon
Title: Re: DateTime & DateDiff
Post by: Rsir on December 29, 2008, 10:12:07 PM
Hi,
most of the date and time functions are in kernel32.lib
and syntax and info in the API help file.
Rsir
Title: Re: DateTime & DateDiff
Post by: GregL on December 30, 2008, 04:30:37 AM
They are in \masm32\datetime.

Title: Re: DateTime & DateDiff [SOLVED!]
Post by: squares on December 30, 2008, 07:58:40 AM
EXCELLENT!
I realised I was using a really old version of MASM, hence the lack of libraries.
I had a look at kernel32 functions and I'm now really glad I don't have to do it that way, it looks painful.

Thanks very much for the help folks!

- Gordon
Title: Re: DateTime & DateDiff
Post by: ecube on January 02, 2009, 04:57:27 AM
how does date and time work on international pcs(pc in china vs a pc in the US), I get military time and timezones, but is there a way with these functions to go by a universal time and date? 
Title: Re: DateTime & DateDiff
Post by: GregL on January 02, 2009, 09:49:55 PM
E^Cube,

Look at the help file \masm32\help\DateTime.chm. You can work with local or UTC times and convert back and forth.

I recently posted an update of the DateDiff function here (http://www.masm32.com/board/index.php?topic=9994.msg73220#msg73220).

I posted an example program that displays the current time for every time zone here (http://www.masm32.com/board/index.php?topic=7676.msg56422#msg56422).

[Edit] There is also a program to test the library here (http://www.masm32.com/board/index.php?topic=7676.msg56558#msg56558).
Title: Re: DateTime & DateDiff
Post by: ecube on January 05, 2009, 03:32:38 PM
wow, very nice :D exactly what I been looking for! thanks for sharing greg, you're an all-star  :U
Title: Re: DateTime & DateDiff
Post by: GregL on January 05, 2009, 09:16:45 PM
E^cube,

You are welcome, and thanks.  :bg