Ganesh2VL Posted April 4, 2017 Share Posted April 4, 2017 Dears, Please guide,I am using the below code to convert month as MMM format, but somehow its not working on production server(variable used without being declared). StringUpper(_DateToMonth(@MON, $DMW_SHORTNAME)). Thanks VL.ganesh Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted April 4, 2017 Moderators Share Posted April 4, 2017 (edited) Ganesh2VL, You probably need to add #include <Date.au3> at the top of your script. In future please post in General Support for general support questions - the Developer General Discussion section does clearly say: Quote If it's super geeky and you don't know where to put it - it's probably here And I would certainly not count this as a "super geeky" question. M23 Edit: And I see I have moved several of your threads before this one, so please take this point to heart. Edited April 4, 2017 by Melba23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Ganesh2VL Posted April 5, 2017 Author Share Posted April 5, 2017 15 hours ago, Melba23 said: Ganesh2VL, You probably need to add #include <Date.au3> at the top of your script. In future please post in General Support for general support questions - the Developer General Discussion section does clearly say: And I would certainly not count this as a "super geeky" question. M23 Edit: And I see I have moved several of your threads before this one, so please take this point to heart. Sure, Will create new ticket in General Support. Header #include <Date.au3> is already in place, moreover the same script running perfectly from another system. I am thinking the issue related with PC datetime format? So is there any other way to achieve the same. Thanks Link to comment Share on other sites More sharing options...
Floops Posted April 5, 2017 Share Posted April 5, 2017 You could try this expandcollapse popup$var = StringUpper(_DateToMonthShort(@MON)) MsgBox(0, "", $var) Func _DateToMonthShort($month) Switch $month Case 01 Return "Jan" Case 02 Return "Feb" Case 03 Return "Mar" Case 04 Return "Apr" Case 05 Return "May" Case 06 Return "Jun" Case 07 Return "Jul" Case 08 Return "Aug" Case 09 Return "Sep" Case 10 Return "Oct" Case 11 Return "Nov" Case 12 Return "Dec" Case Else Return "" EndSwitch EndFunc Not the prettiest solution but should work on every computer. Link to comment Share on other sites More sharing options...
Ganesh2VL Posted April 5, 2017 Author Share Posted April 5, 2017 20 minutes ago, Floops said: You could try this expandcollapse popup$var = StringUpper(_DateToMonthShort(@MON)) MsgBox(0, "", $var) Func _DateToMonthShort($month) Switch $month Case 01 Return "Jan" Case 02 Return "Feb" Case 03 Return "Mar" Case 04 Return "Apr" Case 05 Return "May" Case 06 Return "Jun" Case 07 Return "Jul" Case 08 Return "Aug" Case 09 Return "Sep" Case 10 Return "Oct" Case 11 Return "Nov" Case 12 Return "Dec" Case Else Return "" EndSwitch EndFunc Not the prettiest solution but should work on every computer. Thanks a lot 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