-
1 Sep 2011 7:31 AM #1
Unanswered: Date and time
Unanswered: Date and time
Hi
I am looking for a function like
echo (date("d/m/y : H:i
", time()) );
which diplays new value every time we refresh.
Isn't there similar function in extjs?
Thanks in advance.
-
1 Sep 2011 8:00 AM #2Sencha - Services Team
- Join Date
- May 2007
- Location
- Munich (Germany)
- Posts
- 2,292
- Vote Rating
- 6
- Answers
- 57
-
1 Sep 2011 8:41 AM #3
I tried this but it says that Ext.Date is undefinedCode:var dt = new Date('1/10/2007 03:05:01 PM GMT-0600'); var today =Ext.Date.format(dt, 'Y-m-d'); alert(today);
.
What should is do to resolve this in extjs. I am using version 3.4.0
Sorry for simple question since I am new to Extjs.
-
1 Sep 2011 9:06 AM #4Sencha - Services Team
- Join Date
- May 2007
- Location
- Munich (Germany)
- Posts
- 2,292
- Vote Rating
- 6
- Answers
- 57
this is an ext 4 forum

for ext 3 the link is
http://dev.sencha.com/deploy/ext-3.4.0/docs/
Code:var dt = new Date('1/10/2007 03:05:01 PM GMT-0600'); document.write(dt.format('Y-m-d')); // 2007-01-10 document.write(dt.format('F j, Y, g:i a')); // January 10, 2007, 3:05 pm document.write(dt.format('l, \\t\\he jS \\of F Y h:i:s A')); // Wednesday, the 10th of January 2007 03:05:01 PM
-
1 Sep 2011 9:49 AM #5
It worked!!!
Thanks a lot
will be asking more in future


Reply With Quote