Click here to Skip to main content
16,020,188 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Guys

I would like to know how would i be able to format current date and time to the following format
dd-mmm-yyyy HH:mm:ss
03-MAR-2016 12:02:03

Thanks

What I have tried:

Dateandtime.now.tostring("dd-mmm-yyyy HH:mm:ss")
Posted
Updated 3-Mar-16 23:22pm
v2

1 solution

The correct format is:
dd-MMM-yyyy HH:mm:ss

see Custom Date and Time Format Strings[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900