Jump to content

Date/Time Control


alawoona
 Share

Recommended Posts

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • Developers

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 ??

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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.
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...