Need Help in Formatting Date "Fri Jul 6 16:01:56 EDT 2007"
Can any one help me in formatting Date? I want to send CURRENT date to client in following format:
"Fri Jul 6 16:01:56 EDT 2007"
I tried few things but did not get exact format. Please give me code that works on all browsers at least on FF and IE. Please help me out.
Last edited by shahaninad; 10-06-2008 at 03:17 AM.
Reason: some imp text missed
check this out. i am sure you can find your answer there
Hey thanks for your reply...
I already checked that site. its contains code for Cold Fusion and I am using simple JS.
Nothing wrong with the format, but to get a Date object you need to create a new Date with the result of Date.parse.
var s="Fri Jul 6 16:01:56 EDT 2007";
If you want to display a different string than the computer default, you can redefine the Date.prototype.toString method,
but it would be better to just write a method that converts the string the way you want.
Last edited by mrhoo; 10-06-2008 at 01:29 PM.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread