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 6564519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:58:37+00:00 2026-05-25T13:58:37+00:00

I am calling the date a record was created at in a basic app

  • 0

I am calling the date a record was created at in a basic app running Rails 3.1.

<%= @issue.created_at %>

The above outputs the following timestamp:

2011-09-10 14:44:24 UTC

What is the simplest way of altering the way this displays? I would like something like this:

10 Sept. 2011

and then somehow call it again with a different format:

14:44

so I can call it twice and merge the two together:

10 Sept. 2011
14:44

The reason I want to call it twice rather than create a helper to format a two line date/time is to allow me to call the date in some places and just the time in others.

  • 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-05-25T13:58:37+00:00Added an answer on May 25, 2026 at 1:58 pm

    I would use I18n. Take a look at some example http://guides.rubyonrails.org/i18n.html#adding-date-time-formats. It’s a clean and flexible way of formatting dates and times.

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

Sidebar

Related Questions

When calling CoInitializeEx , you can specify the following values for dwCoInit : typedef
I'm working on a Rails app, where I'm using page caching to store static
I am calling my database which contains a datetime datatype. The date looks like
I need to compare two date in javascript. In my code I am calling
I'm calling the following code: protected void SetCookieValue( string sCookieName, object oValue, DateTime dtExpires)
Right now is 3/15/11 and when I'm calling a new date object: Date now
I have a datetime field in MySQL which I access through calling result.getString('date'), now
i am calling a jQuery plugin every 5 seconds with the following code var
I'm calling a web service with my Sencha Touch mobile app: Ext.regModel('BaseResponse', { idProperty:
Possible Duplicate: How to format a JSON date? I am calling a JSON web

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.