The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: Gunner on December 31, 2010, 02:03:22 AM

Title: Formatting Data/Time Stamp
Post by: Gunner on December 31, 2010, 02:03:22 AM
Searched and everything came up with current date/time stuff... I have the following I would like to convert to a string formatted for the users settings, is there a function anywhere or do I have to try to roll my own?

date stamp: 101230 so for my settings it would display 12/30/10  but want to format for users settings..
time stamp: 210105 my clock displays 2105 but want to format for users settings..

Am I missing an API or function in the MASM library?

Thanks.
Title: Re: Formatting Data/Time Stamp
Post by: GregL on December 31, 2010, 02:10:34 AM
Gunner,

Have you looked in \masm32\datetime ?  There is a help file at \masm32\help\DateTime.chm.

Use the GetLocalDateTime and DateTimeToString procedures.

Title: Re: Formatting Data/Time Stamp
Post by: Gunner on December 31, 2010, 02:17:34 AM
Damn, how the hell did I miss that?!
Thanks Greg, looks interesting...  :U
Title: Re: Formatting Data/Time Stamp
Post by: KeepingRealBusy on December 31, 2010, 02:57:29 AM
When there's that much 'good stuff" to read, it's really easy to miss something.
Title: Re: Formatting Data/Time Stamp
Post by: dedndave on December 31, 2010, 03:41:40 AM
time - such a simple concept - lol
made so very difficult by technical people
universal time, corrected time, sidereal time, solar time - the list never ends
does anybody really know what time it is ?   :P
(25 or 6 to 4, maybe)

msdn has a reduced set, which is still a little complicated since the introduction of NTFS format
http://msdn.microsoft.com/en-us/library/ms724186%28v=VS.85%29.aspx
and - they left "time_t" out from that discussion
http://msdn.microsoft.com/en-us/library/ms724228%28VS.85%29.aspx
Title: Re: Formatting Data/Time Stamp
Post by: KeepingRealBusy on December 31, 2010, 03:47:30 AM
Ken Nordine (sp?) knew someone who knew what time it was, and he talked about it in his record album "Word Jaz" from 1957 time frame (at least that was when I got the album).

Dave.
Title: Re: Formatting Data/Time Stamp
Post by: dedndave on December 31, 2010, 03:51:02 AM
man, you are older than me   :P
i thought i was old with the Chicago referenes - lol

http://www.wordjazz.com/podcast/get.php?web=wordjazz-2006-06-18-59657.mp3
Title: Re: Formatting Data/Time Stamp
Post by: KeepingRealBusy on December 31, 2010, 03:53:17 AM
Graduated from High School in 1957, older 'n dirt.
Title: Re: Formatting Data/Time Stamp
Post by: dedndave on December 31, 2010, 03:56:43 AM
i was still in diapers - lol
but - those were good years for music, cars and women   :U
Title: Re: Formatting Data/Time Stamp
Post by: KeepingRealBusy on December 31, 2010, 03:59:25 AM
The "good old days". Something to remember is that the days were not really that good, and we were not that old, and we were not talking about the days.
Title: Re: Formatting Data/Time Stamp
Post by: jj2007 on December 31, 2010, 09:20:58 AM
Quote from: dedndave on December 31, 2010, 03:56:43 AM
i was still in diapers - lol

1957? Yes, me too :bg
Title: Re: Formatting Data/Time Stamp
Post by: GregL on January 01, 2011, 12:58:44 AM
Quotei was still in diapers - lol

I was -1.
Title: Re: Formatting Data/Time Stamp
Post by: dedndave on January 01, 2011, 01:46:50 AM
Greg, you're a youngster   :P
born in '55, here
my younger brother was born in '58
Title: Re: Formatting Data/Time Stamp
Post by: GregL on January 01, 2011, 02:00:42 AM
Quote from: dedndaveGreg, you're a youngster    :P 

I sure don't feel like a youngster.   :lol



Title: Re: Formatting Data/Time Stamp
Post by: Gunner on January 01, 2011, 02:20:38 AM
Damn, I was born in '74... I AM a "youngster" compared you old foggies  :bg
Title: Re: Formatting Data/Time Stamp
Post by: dedndave on January 01, 2011, 03:22:21 AM
 :P

Zara was born in '74
i was in the army at the time   :bg
Title: Re: Formatting Data/Time Stamp
Post by: FORTRANS on January 01, 2011, 01:39:21 PM
Hi,

   I guess I rate as an old fogey than as well...  Graduated high
school in 1969, college in 1973.

Ick,

Steve N.
Title: Re: Formatting Data/Time Stamp
Post by: dedndave on January 01, 2011, 02:14:00 PM
i guess that would explain all the computers in your museum   :bg