Boopathi
(Boopathi Manogar)
March 28, 2018, 5:32pm
1
Hello
I want to print date in 24 hour format. Please suggest. Currently taking a screenshot and saving them in dd_MMM_yyyy_hh_mm_ss format and the system time is 18:24. The output captures time only as 06_24 (hh_mm) how to make it as 18_24. Please suggest
1 Like
arivu96
(Arivazhagan A)
March 28, 2018, 5:34pm
2
Hi @Boopathi ,
HH:mm:ss
HH → 24 hour format
Custom date format
Regards,
Arivu
9 Likes
Atul_Rai
(Atul Rai)
July 22, 2018, 6:20am
4
Hi @arivu96
I am using message box to diaplay todays date but it is giving wrong output.
Input: DateTime.Now.ToString(“mm-dd-yyy”)
output: 48-22-2018
I tried with different options but every time it gives wrong value for month.
How to solve this issue?
now.ToString(“MM-dd-yyyy”)
Use this!
Atul_Rai
(Atul Rai)
July 22, 2018, 7:09am
6
Thanks @Niket_Ghai .
It is working fine. Can we print print tomorrows date with this method?
1 Like
now.AddDays(1).ToString(“MM-dd-yyyy”)
There you go!
Atul_Rai
(Atul Rai)
July 22, 2018, 7:22am
8
Thanks @Niket_Ghai .
Great Work.
1 Like
System.DateTime.Now.ToString(“dd.MM.yyyy hhmmss tt”)
tt will give AM/PM
Thank you, you helps me more then onetime
Luis_Colin
(Luis Colin)
February 19, 2024, 11:37pm
11
Use uppercase for 24 format.
Now.toString("HH mm ss")