Glenjamin 0 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 Share this post Link to post Share on other sites
UEZ 1,274 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Share this post Link to post Share on other sites
Glenjamin 0 Posted April 20, 2011 Hi UEZ, Thank you. It doe's exactly what it say's on the tin. Cheers Share this post Link to post Share on other sites