Glenjamin Posted April 19, 2011 Share Posted April 19, 2011 Hi, How can I show the DAY as one variable, the MONTH as another varible and YEAR as another variable with GuiCtrlCreateDate with $DTS_SHORTDATEFORMAT. I need to know due to when they click on a button it will change a URL with the DAY,MONTH & YEAR in as a seperate link. Thank you Link to comment Share on other sites More sharing options...
UEZ Posted April 19, 2011 Share Posted April 19, 2011 (edited) Try this whereas you have to change it to your needs because of different date settings: #include <GUIConstantsEx.au3> #include <DateTimeConstants.au3> Global $date, $msg GUICreate("My GUI get date", 200, 200, 800, 200) $date = GUICtrlCreateDate("1953/04/25", 10, 10, 185, 20, $DTS_SHORTDATEFORMAT) GUISetState() ; Run the GUI until the dialog is closed Do $msg = GUIGetMsg() Until $msg = $GUI_EVENT_CLOSE $aDate = StringRegExp(GUICtrlRead($date), "(\d+)", 3) ;date format = 25.04.1953 -> dd.mm.yyyy $day = $aDate[0] $month = $aDate[1] $year = $aDate[2] MsgBox(0, "Date", "Day: " & $day & @CRLF & _ "Month: " & $month & @CRLF & _ "Year: " & $year) GUIDelete() This is an example for dd.mm.yyyy! Br, UEZ Edited April 19, 2011 by UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Glenjamin Posted April 20, 2011 Author Share Posted April 20, 2011 Hi UEZ, Thank you. It doe's exactly what it say's on the tin. Cheers 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