pseakins Posted August 16, 2023 Share Posted August 16, 2023 (edited) On 8/16/2023 at 12:02 AM, GMK said: OK, I may have found the problem. For If statements like the following: EDIT: Something is still not right, these changes break other parts of the UDF so I am retracting my post pending further investigation. Good find, and an easy mistake to make. I changed line 347, 392 (2 occurrences), 433 and 450 in DTC_Test.au3 but unfortunately it doesn't fix the issue I reported above where the "8:00 AM" time in string "July 9, 2023 8:00 AM" is still being output as ":00" instead of "08:00". Edited August 17, 2023 by pseakins typo. Retraction. Phil Seakins Link to comment Share on other sites More sharing options...
GMK Posted August 17, 2023 Share Posted August 17, 2023 (edited) Edit: Apparently I don't know what I'm doing like Melba23 does. Edited August 18, 2023 by GMK Removed edit Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 17, 2023 Author Moderators Share Posted August 17, 2023 Hi guys, Real life has been a bit complicated recently so I am only just beginning to look into the problems you have both reported. Sorry for the delay, but I should be able to work on the UDF in the very near future. 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 18, 2023 Share Posted August 18, 2023 4 hours ago, GMK said: I made some edits I see you made a lot of changes. This fixes the issue I was having but unfortunately it breaks the very first example in Melba's DTC_Example.au3 Phil Seakins Link to comment Share on other sites More sharing options...
pseakins Posted August 18, 2023 Share Posted August 18, 2023 (edited) 4 hours ago, Melba23 said: Real life has been a bit complicated recently so I am only just beginning to look into the problems you have both reported. That's ok Melba, no hurry, I have a workaround. Thanks for all the work you do. Edited August 18, 2023 by pseakins typo Phil Seakins Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 18, 2023 Author Moderators Share Posted August 18, 2023 (edited) Hiya again, I found the reason for pseakins' problem - the UDF was not internally converting 12hr hours into 24h hours because of a coding error on my part (incorrect array elements referenced). This new code also works with GMK's problem code too, so I appear to have soved both problems with just the one change - very happy! Both of you please try and break this new beta: 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...
GMK Posted August 18, 2023 Share Posted August 18, 2023 $sDate = 'August 18, 2023' $sNewDate = _Date_Time_Convert($sDate, 'MMMM d, yyyy', 'yyyy-MM-dd HH:mm:ss') If @error Then ConsoleWrite('@error = ' & @error & '; @extended = ' & @extended & @CRLF) Else ConsoleWrite(StringFormat('%s = %s', $sDate, $sNewDate) & @CRLF) EndIf produces August 18, 2023 = 2023-08-18 :**:** I was expecting '**' placeholders for the 'HH' output as well? (Just trying to "break the beta.") Thanks for your time, @Melba23! Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 18, 2023 Author Moderators Share Posted August 18, 2023 (edited) GMK, Good spot! M23 Edited December 18, 2023 by Melba23 Removed Beta code 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 19, 2023 Share Posted August 19, 2023 10 hours ago, Melba23 said: Both of you please try and break this new beta: With my limited testing I can't find anything wrong with it now Melba! Thank you again. Phil Seakins Link to comment Share on other sites More sharing options...
pseakins Posted December 18, 2023 Share Posted December 18, 2023 https://www.autoitscript.com/forum/topic/154684-date_time_convert-new-version-17-jun-23/?do=findComment&comment=1523001 Hi @Melba23 The final DTC_Test.au3 beta posted above does not correctly convert 12:01 to 12:01 PM on my PC as demonstrated below. Is this still buggy or have I messed up my masks? Cheers and Merry Xmas to all. #include <MsgBoxConstants.au3> #include "DTC.au3" Global $sIn_Date, $sOut_Date ; This converts correctly to "Saturday, December 2, 2023 at 11:01 AM" $sIn_Date = "2023/12/02 11:01:00" $sOut_Date = _Date_Time_Convert($sIn_Date, "yyyy/MM/dd HH:mm:ss", "dddd, MMMM d, yyyy at h:mm TT") MsgBox($MB_SYSTEMMODAL, "DTC Conversion", $sIn_Date & @CRLF & $sOut_Date) ; This converts incorrectly to "Saturday, December 2, 2023 at 0:01 PM" $sIn_Date = "2023/12/02 12:01:00" $sOut_Date = _Date_Time_Convert($sIn_Date, "yyyy/MM/dd HH:mm:ss", "dddd, MMMM d, yyyy at h:mm TT") MsgBox($MB_SYSTEMMODAL, "DTC Conversion", $sIn_Date & @CRLF & $sOut_Date) Phil Seakins Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted December 18, 2023 Author Moderators Share Posted December 18, 2023 pseakins, My bad - try this: DTC_Test.au3 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 December 18, 2023 Share Posted December 18, 2023 39 minutes ago, Melba23 said: My bad - try this: Melba. Yes. I just found the same solution, came here to post and see you already fixed it. Thanks again. Phil Seakins 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