searchsanjaysharma
asked on
How to change date format in DD-MMM-YYYY
I have the following date and time in
2/16/2012 1:42:04 PM
The date should come as dd-mm-yyyy
this is code i m using string a = DateTime.Now.ToString();
2/16/2012 1:42:04 PM
The date should come as dd-mm-yyyy
this is code i m using string a = DateTime.Now.ToString();
ASKER
I need time also. in hh:mm:ss which should refresh automatically and i am using asp.net framework 2.0
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
for time, 'HH' makes it 24 hour. you can use 'hh' if you're only interested in 12 hour...
ASKER
tHANKS
No problem :-)
You should be able to use this:
Open in new window
Hope this helps,
James