Software-OK
≡... News | ... Home | ... FAQ | Impressum | Contact | Listed at | Thank you |

  
HOME ► Faq ► FAQ - DesktopDigitalClock ► ««« FAQ 29 / 30 »»»

With strftime you can use your own time and date formats for the desktop clock!?


Yes, with the help of `strftime` you can use your own time and date formats in the DesktopDigitalClock. The `strftime` function allows you to format the date and time as you wish.







Information about strftime on >> ... learn.microsoft.com/ .. strftime-wcsftime-strftime-l-wcsftime-l?view=msvc-170



1. Enabling your own time and date formats:
2. Here are some examples of possible formatting:
3. Here are other possible `strftime` formats for the DesktopDigitalClock:
4. What should you pay particular attention to with date and time formats!?






1.) Enabling your own time and date formats:




(... see Image-1, Point 1 to 3) 


(Image-1) Use your own time and date formats for the desktop clock!
Use your own time and date formats for the desktop clock!


-
▲ Back to the top ▲







2.) Here are some examples of possible formatting:




- `%H:%M:%S` → 24-hour format (e.g. 14:30:15)


- `%I:%M:%S %p` → 12-hour format with AM/PM (e.g. 02:30:15 PM)


- `%A, %d. %B %Y` → Day of the week, day, month, year (e.g. Monday, February 26, 2024)

- `%d-%m-%Y %H:%M` → Short date format with time (e.g. 26-02-2024 14:30)

By adjusting these formats, you can customize the appearance of the DesktopDigitalClock.




3.) Here are other possible `strftime` formats for the DesktopDigitalClock:



Time formats




- `%H:%M` → 24-hour time without seconds (e.g. 14:30)

- `%I:%M %p` → 12-hour time without seconds (e.g. 02:30 PM)

- `%H:%M:%S.%f` → Time with microseconds (e.g. 14:30:15.123456)

- `%X` → Local time format (depending on system setting)

Date formats




- `%d.%m.%Y` → German standard format (e.g. 26.02.2024)

- `%m/%d/%y` → US format with two-digit year (e.g. 02/26/24)

- `%B %d, %Y` → month spelled out with day and year (e.g. February 26, 2024)

- `%A, %B %d` → day of the week and month with day (e.g. Monday, February 26)

- `%Y-%m-%d` → ISO format (e.g. 2024-02-26)

- `%Y-W%V-%u` → calendar week and day of the week (e.g. 2024-W09-1 for Monday of the 9th calendar week)

Combined formats




- `%A, %d. %B %Y - %H:%M:%S` → Full date with time (e.g. Monday, February 26, 2024 - 14:30:15)

- `%d/%m/%Y %I:%M:%S %p` → European date with 12-hour time (e.g. 26/02/2024 02:30:15 PM)

- `%Y-%m-%d %H:%M:%S` → ISO date with time (e.g. 2024-02-26 14:30:15)

- `Today is %A, the %d. %B %Y, and the time is %H:%M:%S`
→ (e.g. "Today is Monday, February 26, 2024, and the time is 14:30:15")

You can use these formats in the DesktopDigitalClock to display the date and time exactly as you wish. 😊




4.) What should you pay particular attention to with date and time formats!?



When adjusting date and time formats in the DesktopDigitalClock with `strftime`, there are a few important points to consider:

1. Adjust formatting for different languages




- The names of weekdays (`%A`) and months (`%B`) are displayed in the language of the system.


- If the system is set to English, for example, "Monday" appears instead of "Montag".

- For uniform language settings it may be necessary to adjust the language of the system or application.

2. Consider 12- or 24-hour format




- `%H` (24-hour format) → 14:30

- `%I` (12-hour format) with `%p` → 02:30 PM

- In countries like Germany the 24-hour format is more common, while in the USA the 12-hour format with AM/PM is more commonly used.

3. Separator and order of the date




- German format: `%d.%m.%Y` → 02/26/2024


- US format: `%m/%d/%Y` → 02/26/2024


- ISO format (recommended for international use): `%Y-%m-%d` → 2024-02-26

The wrong separator or an unusual order can lead to misunderstandings, especially between US and EU formats!

4. Consideration of leading zeros




- `%d` and `%m` → with leading zero (e.g. 03/05/2024)


- `%-d` and `%-m` (not supported everywhere) → without leading zero (e.g. 3/5/2024)

5. Display calendar week and weekdays correctly




- `%V` outputs the ISO calendar week (e.g. 09 for the 9th week).


- `%u` outputs the weekday as a number (1 = Monday, 7 = Sunday).


- Different countries start the week differently:


- Germany: Monday as the first day


- USA: Sunday as the first day

6. Combine time and date information




- By default, there is no space between date and time information, so it must be inserted manually:


- Incorrect: `%d.%m.%Y%H:%M:%S` → 26.02.202414:30:15


- Correct: `%d.%m.%Y %H:%M:%S` → 26.02.2024 14:30:15

7. Consider daylight saving time and time zones




- `%Z` outputs the time zone as an abbreviation (e.g. CET for Central European Time).


- `%z` outputs the time zone as an offset to UTC time (e.g. +0100 for CET or +0200 for CEST).


- These details may change with daylight saving time and should be taken into account for international applications.

Conclusion



To avoid misunderstandings, you should:

✔ Check the correct language for month and weekday names.
✔ The correct date format depending on
✔ Use the appropriate time format (12h or 24h).
✔ Observe time zones & daylight saving time if relevant.
✔ Set separators & spaces correctly.

This ensures a precise and easy-to-read display in the DesktopDigitalClock. 😊



FAQ 29: Updated on: 27 February 2025 18:55 Windows


► ► ► ► ... more information about the software DesktopDigitalClock     

DesktopDigitalClock

Who should definitely use the Digital Desktop Clock in Windows?


Detailed user questions and answers on the topic of who should definitely use the digital desktop clock in Windows, divided into categories: Please use the:
DesktopDigitalClock

How can I disable the date display on the desktop clock?


You can turn off the desktop clock very simple the digital display of the month and of the month day and year   Content: 1. Disable the date display
DesktopDigitalClock

Change the date and time display format in desktop clock?


The DDC.exe is currently in the Windows 11, 10, 8.1, 7 system preset date and time display format used in the desktop clock Info: You can complete in
DesktopDigitalClock

Is the desktop clock not a system resources waster for Windows?


The desktop clock hardly loads the system and has been developed very system-gentle on Windows 11, 10, etc.  As a system resources spreader you cannot
DesktopDigitalClock

Multiple themed slots to save your desktop clock settings!


Practical is the multiple themed slots for storing the desktop clock settings that can be reset at any time on Windows 10, 11, etc.   Content: 1.
DesktopDigitalClock

Let the digital desktop clock start with all MS Windows 11, 10, ... OS!


You can easily start the digital desktop clock with Windows under MS Windows 11, 10, etc. desktops and e.g. MS Server 2019,   Content: 1. Start

»»

  My question is not there in the FAQ
Asked questions on this answer:
Keywords: desktopdigitalclock, with, strftime, your, time, date, formats, desktop, clock, help, function, allows, format, Questions, Answers, Software




  

  + Freeware
  + Order on the PC
  + File management
  + Automation
  + Office Tools
  + PC testing tools
  + Decoration and fun
  + Desktop-Clocks
  + Security

  + SoftwareOK Pages
  + Micro Staff
  + Freeware-1
  + Freeware-2
  + Freeware-3
  + FAQ
  + Downloads

  + Top
  + Desktop-OK
  + The Quad Explorer
  + Don't Sleep
  + Win-Scan-2-PDF
  + Quick-Text-Past
  + Print Folder Tree
  + Find Same Images
  + Experience-Index-OK
  + Font-View-OK


  + Freeware
  + DesktopImages3D
  + WinPing
  + GetPixelColor
  + StressMyPC
  + DesktopSnowOK
  + Delete.On.Reboot
  + IsMyTouchScreenOK
  + Print.Test.Page.OK
  + OpenCloseDriveEject
  + PAD-s


Home | Thanks | Contact | Link me | FAQ | Settings | Windows 10 | gc24b | English-AV | Impressum | Translate | PayPal | PAD-s

 © 2025 by Nenad Hrg softwareok.de • softwareok.com • softwareok.com • softwareok.eu


► Please! Do not read this unnecessary text! ◄
► No connection via WiFi / W-LAN under my Windows 10 / 11 Surface, why? ◄
► TortoiseSVN Overlay Icons and others are supported in Quad Explorer! ◄
► Complete check for Trojans, viruses and ransomware, how to! ◄


This website does not store personal data. However, third-party providers are used to display ads,
which are managed by Google and comply with the IAB Transparency and Consent Framework (IAB-TCF).
The CMP ID is 300 and can be individually customized at the bottom of the page.
more Infos & Privacy Policy

....