Supratik Posted April 22, 2011 Share 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. Link to comment Share on other sites More sharing options...
UEZ Posted April 22, 2011 Share 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ Link to comment Share on other sites More sharing options...
Supratik Posted April 22, 2011 Author Share 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.... Link to comment Share on other sites More sharing options...
Supratik Posted April 22, 2011 Author Share 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 Link to comment Share on other sites More sharing options...
UEZ Posted April 22, 2011 Share 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!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ 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