Sign in to follow this  
Followers 0
alawoona

Date/Time Control

5 posts in this topic

#1 ·  Posted (edited)

I have my system clock set to show time in AM /PM format. When I use the date/time control with DTS_TIMEFORMAT the time control also uses the AM/PM format. Is there any way I can have the control use 24 hour time format, i.e. override the system time format without changing the sytem time format?

#include "GUIConstants.au3"
$DTS_TIMEFORMAT = 0x09
GUICreate("test", 200, 200)

$oTime = GUICtrlCreateDate(@HOUR & ":" & @MIN & ":" & "00", 20, 50, 90, 20, $DTS_TIMEFORMAT)

GUISetState()

While 1
   $msg = GUIGetMsg()
   If $msg = $GUI_EVENT_CLOSE Then ExitLoop
   $szTime = GUIRead($oTime)
  ;GUICtrlSetData ( $oTime,  @HOUR & ":" & @MIN & ":" & @SEC )
Wend
MsgBox(0, "", $szTime)
Edited by alawoona

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

just change the control to a GUICtrlCreateLabel....

<{POST_SNAPBACK}>

JdeB - not sure that gets me what I want - I need to use the time control with the up/down arrows for the user to input an elapsed time. Edited by alawoona

Share this post


Link to post
Share on other sites

JdeB - not sure that gets me what I want - I need to use the time control with the up/down arrows for the user to input an elapsed time.

<{POST_SNAPBACK}>

understand now... sorry..

Had a quick look at the possible values for the format but didn't see anything usefull... maybe some one else knows ??


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

understand now...  sorry..

Had a quick look at the possible values for the format but didn't see anything usefull... maybe some one else knows ??

<{POST_SNAPBACK}>

no problem - thanks for trying - I have searched MSDN and cannot find anything relevant.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0