Jump to content

Recommended Posts

Posted (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 by pseakins
typo. Retraction.

Phil Seakins

Posted (edited)

Edit: Apparently I don't know what I'm doing like Melba23 does.

 

Edited by GMK
Removed edit
  • Moderators
Posted

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

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted
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

Posted (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 by pseakins
typo

Phil Seakins

  • Moderators
Posted (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 by Melba23
Beta code removed

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted
$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!

  • Moderators
Posted (edited)

GMK,

Good spot!

 

 

M23

Edited by Melba23
Removed Beta code

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted
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

  • 3 months later...
Posted

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

  • Moderators
Posted

pseakins,

My bad - try this: DTC_Test.au3

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png 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 columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Posted
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...