1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    78
    Answers
    1
    Vote Rating
    0
    new2extjs is on a distinguished road

      0  

    Default 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.

  2. #2
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,684
    Answers
    130
    Vote Rating
    112
    tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all

      0  
    Best regards
    Tobias Uhlig
    __________

    S-CIRCLES Social Network Engine

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Posts
    78
    Answers
    1
    Vote Rating
    0
    new2extjs is on a distinguished road

      0  

    Default


    Code:
    var dt = new Date('1/10/2007 03:05:01 PM GMT-0600');
    var today =Ext.Date.format(dt, 'Y-m-d');
        alert(today);
    I tried this but it says that Ext.Date is undefined .
    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.

  4. #4
    Sencha User tobiu's Avatar
    Join Date
    May 2007
    Location
    Munich (Germany)
    Posts
    2,684
    Answers
    130
    Vote Rating
    112
    tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all tobiu is a name known to all

      0  

    Default


    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
    Best regards
    Tobias Uhlig
    __________

    S-CIRCLES Social Network Engine

  5. #5
    Sencha User
    Join Date
    Sep 2011
    Posts
    78
    Answers
    1
    Vote Rating
    0
    new2extjs is on a distinguished road

      0  

    Default


    It worked!!!
    Thanks a lot
    will be asking more in future

Thread Participants: 1