Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9162457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:12:58+00:00 2026-06-17T14:12:58+00:00

I’m working with the date and time in my Titanium based iOS application. My

  • 0

I’m working with the date and time in my Titanium based iOS application.

My issue is, I’m getting the time in the below format:

Wed Jan 16 2013 17:32:40 GMT+0530 (IST)

I want to change it like:

Jan 16, 2013, 05:32 pm

In iOS there is NSDateFormatter for doing this.

What I did :

  1. Currently I’m doing it manually using split and switch cases, but it fails if the input time format changes, then I need to re-write the code for the changed format.
  2. I searched alot in Titanium Docs, but didn’t get any solution.
  3. I asked same question on their forum, didn’t get any reply till now.

Is there is anyway to do this in Titanium?

Please help, Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T14:13:00+00:00Added an answer on June 17, 2026 at 2:13 pm

    I didn’t find any alternatives for the NSDateFormatter in Titanium.

    I tested the Moment.js, but it didn’t worked for my case.

    I implemented a JavaScript function for achieving my output.

    /**
     * Function for formatting the date and time 
     * @param {Object} dateTime 
     */
    function formatDateTime(dateTime)
    {
        var arr = dateTime.split(' ');
        var convertedDate = arr[1]+' '+arr[2]+', '+arr[3];
        var convertedTime = arr[4];
        var returnValue = convertedDate+', '+convertedTime;
        return returnValue;
    }
    

    Edit on 27 Feb 2014

    After facing the JavaScript date formatting issue on different occasions, I finally developed my own JavaScript module, this module will format the JavaScript Date object to Specified formats. You can find it here : MMP_DateTime

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
Configuring TinyMCE to allow for tags, based on a customer requirement. My config is
I am using JSon response to parse title,date content and thumbnail images and place
I have a small JavaScript validation script that validates inputs based on Regex. I
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
Does anyone know how can I replace this 2 symbol below from the string
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
Let's say I'm outputting a post title and in our database, it's Hello Y’all
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.