Gogi02 Posted June 30, 2010 Share Posted June 30, 2010 First of all sorry for my not so perfect english. What I'd like to do is program a date picker where user is presented with a box where he can enter numbers and function automatically converts it to date format. For example user would enter 01072010 and program would convert it to date format like 01.07.2010. Unfortunately I have no Idea how to do it. Could someone please point me in the right direction? Link to comment Share on other sites More sharing options...
Mat Posted June 30, 2010 Share Posted June 30, 2010 (edited) We've got better than that... Built in (sort of) #include <GuiDateTimePicker.au3> ; Create GUI Local $hGUI = GUICreate("DateTimePick", 400, 300) Local $hDTP = _GUICtrlDTP_Create($hGUI, 2, 6, 190) GUISetState() ; Set the display format _GUICtrlDTP_SetFormat($hDTP, "dd:MM:yyyy") ; Loop until user exits While GUIGetMsg() <> -3 Sleep(10) WEnd Edit: changed format to what OP wanted Edited June 30, 2010 by Mat AutoIt Project Listing Link to comment Share on other sites More sharing options...
Gogi02 Posted July 1, 2010 Author Share Posted July 1, 2010 Yeah I know about that. But I'd like to modify that so that when you enter day it would automatically jump to months and then years without the need to press an arrow key. Link to comment Share on other sites More sharing options...
Mat Posted July 1, 2010 Share Posted July 1, 2010 You might need to process the $DTN_USERSTRING notification... I'll have a look at it for you as I'm surprised it doesn't do it by default... AutoIt Project Listing Link to comment Share on other sites More sharing options...
Gogi02 Posted July 1, 2010 Author Share Posted July 1, 2010 On the other note. How do I get data from picker box. What I mean is how do I get the date picked in a variable so I can work with it? Link to comment Share on other sites More sharing options...
Mat Posted July 1, 2010 Share Posted July 1, 2010 _GUICtrlDTP_GetSystemTime AutoIt Project Listing 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