Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

How to convert UNIX TIMESTAMP to format yyyy-mm-dd ?

In my sqllite databse my date is formated to unix timestamp but i would like to show in my view in this format : yyyy-mm-dd. Is there a solution ?
Thank.

— asked September 26th 2010 by MILLET Alexandre
0 Comments

2 Answers

  • Wow this question is old … and still without a proper answer. Well, for those of you who are wondering, here it is … Titanium supports the javascript Date object. Check here for more info: http://www.w3schools.com/jsref/jsref_obj_date.asp

    — answered October 7th 2012 by Robin Stoker
    permalink
    1 Comment
    • You can use the date objects setTime function to convert unix timestamps.

      — commented October 7th 2012 by Robin Stoker
  • I use this

    http://phpjs.org/functions/date:380

    — answered September 26th 2010 by Dan Tamas
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.