Supratik 0 Posted April 22, 2011 how i can get the month part from GUICtrlCreateDate??? actualy i want to show the month in a msgbox, when a user selects a date. Share this post Link to post Share on other sites
UEZ 1,273 Posted April 22, 2011 Look here: Might be helpful for you. Br, 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
Supratik 0 Posted April 22, 2011 $bdate=GUICtrlCreateDate("", -480, -550, 200, 20)$hDTP = GUICtrlGetHandle($bdate)_GUICtrlDTP_SetFormat($hDTP, "dddddddd ; dd,MMMMMMMMM yyyy");i have changed the format of default view of GUICtrlCreateDate in "Day name"; "day number of the month","Month name","year"$aDate = StringRegExp(GUICtrlRead($bdate), "(\d+)", 3); now $adate[0]=day number of the month,$adate[1]=year & $adate[2] has no existence.please help.... Share this post Link to post Share on other sites
Supratik 0 Posted April 22, 2011 (edited) i have done it!!! $adate=StringRegExp(GUICtrlRead($bdate), "(\D+)", 3)msgbox(0,"",$adate[1])thanks Mr. UEZ Edited April 22, 2011 by Supratik Share this post Link to post Share on other sites
UEZ 1,273 Posted April 22, 2011 Try these examples: #include <DateTimeConstants.au3> #include <GUIConstantsEx.au3> #include <GuiDateTimePicker.au3> Global $date, $msg GUICreate("My GUI get date", 200, 200, 800, 200) $date = GUICtrlCreateDate("1914/07/28", 10, 10, 185, 20, $DTS_SHORTDATEFORMAT) GUISetState() Do $msg = GUIGetMsg() Until $msg = $GUI_EVENT_CLOSE _GUICtrlDTP_SetFormat(GUICtrlGetHandle($date), "MMMM") $month = GUICtrlRead($date) GUIDelete() MsgBox(0, "Information", "Current month is: " & $month) GUICreate("My GUI get date", 200, 200, 800, 200) $date = GUICtrlCreateDate("1939/09/01", 10, 10, 185, 20, $DTS_SHORTDATEFORMAT) _GUICtrlDTP_SetFormat(GUICtrlGetHandle($date), "dd MMMM yyy") GUISetState() Do $msg = GUIGetMsg() Until $msg = $GUI_EVENT_CLOSE $month = StringRegExpReplace(GUICtrlRead($date), "\d+", "$1") GUIDelete() MsgBox(0, "Information", "Current month is: " & $month) Br, 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