DateTime control - How to show "Long Local Date, Local Time" at same time? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
guest 55554

DateTime control - How to show "Long Local Date, Local Time" at same time?  Topic is solved

21 Oct 2021, 18:08

How to show "Long Local Date, Local Time" at same time in "DateTime" control?

Note that "dddd MMMM d, yyyy hh:mm:ss tt" is not what I need, because I want the hour format to be the same as local hour format.
User avatar
mikeyww
Posts: 26931
Joined: 09 Sep 2014, 18:38

Re: DateTime control - How to show "Long Local Date, Local Time" at same time?

22 Oct 2021, 05:32

Code: Select all

RegRead, sTimeFormat, HKEY_CURRENT_USER\Control Panel\International, sTimeFormat
hourFormat := ErrorLevel ? "hh" : RegExReplace(sTimeFormat, "i)[^h]")
Gui, Font, s10
Gui, Add, DateTime, vdtime, % "dddd MMMM d, yyyy " hourFormat ":mm:ss" (hourFormat ~= "H" ? "" : " tt")
Gui, Show,, Date and time

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: ht55cd3, OrangeCat and 316 guests