memnon Posted August 31, 2005 Share Posted August 31, 2005 Hello, i think i have a simple question.... if i use _Nowtime () to get actual time i do not get time in 24hour format, what means, if its 14:00 i get 2:00. can somebody help me to get it into te right format ? das beste Windows Support Forum: Windows 2000 Helpline und tschüss den WindowsfehlernProgrammieren: Autoit 3 - wer braucht noch VBS ?!Programmieren: Autoit 3 Forum? Link to comment Share on other sites More sharing options...
BigDod Posted August 31, 2005 Share Posted August 31, 2005 Hello,i think i have a simple question....if i use _Nowtime () to get actual time i do not get time in 24hour format, what means, if its 14:00 i get 2:00.can somebody help me to get it into te right format ?<{POST_SNAPBACK}>How about$hour=@HOUR $min=@MIN $sec=@SEC MsgBox(1, "Time is" , $hour & ":" & $min & ":" & $sec) Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
ning Posted August 31, 2005 Share Posted August 31, 2005 A little digging reveals that _NowTime() just evaluates the @HOUR, @MIN, @SEC, ... macros through another function in the <date.au3> include file, _DateTimeFormat(), which in turn looks up your locale settings in the registry to find out whether to display the time in 24hr or 12hr format. Obviously on your system (and mine) it decides to give you the time in 12hr format. You can get a string for the proper time in 24hr format by just using @HOUR & ":" & @MIN & ":" & @SEC. You don't have to use the <date.au3> package at all. hope that helps ben Link to comment Share on other sites More sharing options...
memnon Posted September 2, 2005 Author Share Posted September 2, 2005 thanks das beste Windows Support Forum: Windows 2000 Helpline und tschüss den WindowsfehlernProgrammieren: Autoit 3 - wer braucht noch VBS ?!Programmieren: Autoit 3 Forum? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now