PDA

View Full Version : How to pass date d/m/Y for new Date() in format M d Y ?



Rafael
25 Apr 2009, 7:15 PM
Need to pass format date d/m/Y for in new Date() in format M d Y

tryanDLS
26 Apr 2009, 8:36 AM
This would seem to be general JS, not Ext. Have you tried google?

syscobra
27 Apr 2009, 6:28 AM
Rafael
You have some examples and sourcecode here:
http://www.mattkruse.com/javascript/date/

Condor
27 Apr 2009, 6:36 AM
This can't be done with plain javascript, so I would think that this is a perfectly valid Ext JS question.

Use:

var d = Ext.parseDate('Jan 01 2000', 'M d Y');
// or
var d = Ext.parseDate('01/01/2000', 'd/m/Y');