MuffettsMan Posted April 15, 2015 Share Posted April 15, 2015 it seems to read from ok but updating the date field seems jacked on two fronts - first the BEFORE isn't sending the right time at all..... the second example doesn't take account of the am/pm is something getting converted? local $GUI = GuiCreate("",200,75) local $testDate = GUICtrlCreateDate("2015/01/14 09:00:00 PM",15,20,90,20,9) $val = GUICtrlRead($testDate) GUIsetState(@SW_SHOW) ConsoleWrite("testDate BEFORE (Should be 2015/01/14 09:00:00 PM): " & $val & @CRLF) sleep(1000) local $test = GUIctrlSetData($testDate,"2015/01/14 10:00:00 PM") $val = GUICtrlRead($testDate) ConsoleWrite("testDate AFTER (should be 2015/01/14 10:00:00 PM): " & $val & @CRLF) While 1 switch GUIgetMsg() Case -3 Exit EndSwitch WEnd Don't let that status fool you, I am no advanced memeber! Link to comment Share on other sites More sharing options...
MuffettsMan Posted April 15, 2015 Author Share Posted April 15, 2015 (edited) attempted HH:mm:ss (military time) to no avail: local $testDate = GUICtrlCreateDate("2015/01/14 21:00:00",15,20,90,20,9) testDate BEFORE (Should be 2015/01/14 21:00:00): 8:05:01 PM EDIT: spoke to soon...it seems to take it ok as an update so will just work with that.... local $test = GUIctrlSetData($testDate,"2015/01/14 22:00:00") $val = GUICtrlRead($testDate) ConsoleWrite("testDate AFTER (should be 2015/01/14 22:00:00): " & $val & @CRLF) Log: testDate AFTER (should be 2015/01/14 22:00:00): 10:00:00 PM hopefully there is a time conversion function else will be a pita that reading yields AM/PM but writing has to be HH:mm:ss Edited April 15, 2015 by MuffettsMan Don't let that status fool you, I am no advanced memeber! Link to comment Share on other sites More sharing options...
MikahS Posted April 15, 2015 Share Posted April 15, 2015 You'll need to make the conversion between AM and PM yourself. Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ Link to comment Share on other sites More sharing options...
MuffettsMan Posted April 15, 2015 Author Share Posted April 15, 2015 well Melba has a date and time udf that works but seems a bit overkill for such a task '?do=embed' frameborder='0' data-embedContent>> Don't let that status fool you, I am no advanced memeber! Link to comment Share on other sites More sharing options...
MuffettsMan Posted April 15, 2015 Author Share Posted April 15, 2015 enhancement request... give the ability to read the same format that the field needs to write back to itself kinda seems broken Don't let that status fool you, I am no advanced memeber! 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