gcue Posted May 15, 2023 Share Posted May 15, 2023 family first! thanks for all you do for the community enjoy the time with the family Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted June 17, 2023 Author Moderators Share Posted June 17, 2023 New version - 17 Jun 23 ======================= Added: Added 24hr unpadded H mask. New UDF in first post. M23 mLipok 1 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...
gcue Posted June 19, 2023 Share Posted June 19, 2023 works great! thank youuuuu!!! Link to comment Share on other sites More sharing options...
gcue Posted July 21, 2023 Share Posted July 21, 2023 @Melba23 noticing a bug i got a blank value from this using the new UDF. switched back to the old one and it worked $first_date = "2022-02" $first_date = _Date_Time_Convert($first_date, "yyyy-MM", "MM/yyyy") Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 22, 2023 Author Moderators Share Posted July 22, 2023 (edited) gcue, Well spotted. Try this: M23 Edited August 18, 2023 by Melba23 Beta code removed 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...
gcue Posted July 22, 2023 Share Posted July 22, 2023 fixed $first_date = "2022-02" $first_date = _Date_Time_Convert($first_date, "yyyy-MM", "MM/yyyy") but now the first 2 here are broken again ;~ $string = "4/28/2023 3:19" ;~ $string = "4/28/2023 9:51" ;~ $string = "4/28/2023 10:51" ;~ $string = "4/28/2023 14:51" $new_string = _Date_Time_Convert($string, "M/d/yyyy HH:mm", "yyyyMMddHHmm") ConsoleWrite($new_string & @CRLF) sorry to be the bearer of bad news Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 22, 2023 Author Moderators Share Posted July 22, 2023 gcue, Mierda! Looking into it! M23 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...
gcue Posted July 23, 2023 Share Posted July 23, 2023 lol. hmm not sure if you are doing this but might be good to collect several samples of formats to convert to "yyyyMMddHHmm" for instance - to automate the testing to ensure output is in that format then maybe other formats to convert to as well and test for those output formats, etc etc so anytime you make a change just run it through the automated test script. not sure if that makes sense just a thought 😊 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 23, 2023 Author Moderators Share Posted July 23, 2023 gcue, <sarcasm> Nah, it is much more fun just to release buggy code! </sarcasm> That is just what I do - but there is a limit to how many formats I can test. M23 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...
Moderators Melba23 Posted July 23, 2023 Author Moderators Share Posted July 23, 2023 (edited) gcue, Quote but now the first 2 here are broken again As I already told you in an earlier post, you need to use the new "H" format if you are using an unpadded 24hr format. In the snippet you posted above you are still using "HH". When I change the format all works as it should. So I am writing this off as "no bug", M23 Edited July 23, 2023 by Melba23 Added a line 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...
gcue Posted July 23, 2023 Share Posted July 23, 2023 ah i misunderstood. i thought it supported both H and HH my apologies Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted July 23, 2023 Author Moderators Share Posted July 23, 2023 gcue, Quote i thought it supported both H and HH It does. But when you have unpadded 24hr codes in the input (which is the case in your example) you must tell the UDF that is the case by using "H". Using "HH" tells it to expect a 2-digit hour value, which is why it errors on the first 2 examples. M23 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...
gcue Posted July 23, 2023 Share Posted July 23, 2023 sorry makes sense thank you!! Link to comment Share on other sites More sharing options...
pseakins Posted August 11, 2023 Share Posted August 11, 2023 (edited) On 7/22/2023 at 9:47 AM, Melba23 said: gcue, Well spotted. Try this: M23 @Melba23 Melba, This test UDF does not match the UDF in the top post which is dated 2/5/23. The top post says it was updated 17/6/23. Also, it would be useful if the UDF were to contain a version number and or release date in the comment. Edited August 18, 2023 by Melba23 Beta code in quote removed Phil Seakins Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 11, 2023 Author Moderators Share Posted August 11, 2023 pseakins, Quote This test UDF does not match the UDF in the top post As one is beta code and the other is the last formal release, I would be rather worried if they did! I will release a new version when I find time. M23 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...
GMK Posted August 11, 2023 Share Posted August 11, 2023 Am I mistaken in thinking that this works as a date converter without time? Global $sDate = 'August 11, 2023' Global $sNewDate = _Date_Time_Convert($sDate, 'MMMM d, yyyy', 'yyyy-MM-dd') If @error Then ConsoleWrite('@error = ' & @error & '; @extended = ' & @extended & @CRLF) Else ConsoleWrite(StringFormat('%s = %s', $sDate, $sNewDate) & @CRLF) EndIf +>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart or Ctrl+BREAK to Stop. @error = 1; @extended = 8 +>09:15:19 AutoIt3.exe ended.rc:0 +>09:15:19 AutoIt3Wrapper Finished. >Exit code: 0 Time: 1.26 Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 11, 2023 Author Moderators Share Posted August 11, 2023 GMK, No, it should do that. I will look into why it does not. Just as well I did not release this version, isn't it! M23 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...
pseakins Posted August 12, 2023 Share Posted August 12, 2023 19 hours ago, GMK said: Am I mistaken in thinking that this works as a date converter without time? GMK's code works on my W7 'puter with DTC_Test.au3 . However, a script I am developing does not work, will post code shortly. >Running:(3.3.16.1):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\user\Documents\AutoIt\DTC_Example.au3" +>Setting Hotkeys...--> Press Ctrl+Alt+Break to Restart or Ctrl+BREAK to Stop. August 11, 2023 = 2023-08-11 Phil Seakins Link to comment Share on other sites More sharing options...
pseakins Posted August 12, 2023 Share Posted August 12, 2023 (edited) On 8/12/2023 at 3:38 AM, Melba23 said: GMK, No, it should do that. I will look into why it does not. Just as well I did not release this version, isn't it! ; GMK's code works for me $sDate = 'August 11, 2023' $sNewDate = _Date_Time_Convert($sDate, 'MMMM d, yyyy', 'yyyy-MM-dd') If @error Then ConsoleWrite('@error = ' & @error & '; @extended = ' & @extended & @CRLF) Else ConsoleWrite(StringFormat('%s = %s', $sDate, $sNewDate) & @CRLF) EndIf ; My code does not work $sDate = 'July 9, 2023 8:00 AM' $sNewDate = _Date_Time_Convert($sDate, "MMMM d, yyyy h:mm TT", "yyyy/MM/dd HH:mm:ss") If @error Then ConsoleWrite('@error = ' & @error & '; @extended = ' & @extended & @CRLF) Else ConsoleWrite(StringFormat('%s = %s', $sDate, $sNewDate) & @CRLF) EndIf ; Distribution UDF @error = 1; @extended = 8 July 9, 2023 8:00 AM = 2023/07/09 :00:** ; Melba's DTC_test.au3 as DTC.au3 August 11, 2023 = 2023-08-11 July 9, 2023 8:00 AM = 2023/07/09 :00:** Actually the mask in my example does not need the seconds, so it should be more like "yyyy/MM/dd HH:mm" but even so I get the wrong result in the time field;- July 9, 2023 8:00 AM = 2023/07/09 :00 Edited August 13, 2023 by pseakins Added more information. Phil Seakins Link to comment Share on other sites More sharing options...
GMK Posted August 15, 2023 Share Posted August 15, 2023 (edited) On 8/11/2023 at 12:38 PM, Melba23 said: GMK, No, it should do that. I will look into why it does not. Just as well I did not release this version, isn't it! M23 OK, I may have found the problem. For If statements like the following: If $aDTC_Data[7][1] & $aDTC_Data[7][2] = "" Then ; Check AM/PM set I replaced the '&' with 'And' If $aDTC_Data[7][1] And $aDTC_Data[7][2] = "" Then ; Check AM/PM set which seemed to fix the problem. Edited August 15, 2023 by GMK Multiple replacements cramaboule 1 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