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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T06:27:23+00:00 2026-05-14T06:27:23+00:00

Using Authlogic, the time format for @user.last_login_at looks like this: Mon Apr 12 16:52:56

  • 0

Using Authlogic, the time format for @user.last_login_at” looks like this:

Mon Apr 12 16:52:56 -0400 2010

How can I mangle that into a more user friendly string?

  • 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-14T06:27:24+00:00Added an answer on May 14, 2026 at 6:27 am

    Use;

    @user.last_login_at.d.strftime(‘%b %d, %Y’) 
    
    # will print April 12, 2010
    
    The following are the format codes;
    Format  Meaning
    %a  The abbreviated weekday name (“Sun’’)
    %A  The full weekday name (“Sunday’’)
    %b  The abbreviated month name (“Jan’’)
    %B  The full month name (“January’’)
    %c  The preferred local date and time representation
    %d  Day of the month (01..31)
    %H  Hour of the day, 24-hour clock (00..23)
    %I  Hour of the day, 12-hour clock (01..12)
    %j  Day of the year (001..366)
    %m  Month of the year (01..12)
    %M  Minute of the hour (00..59)
    %p  Meridian indicator (“AM’’ or “PM’’)
    %S  Second of the minute (00..60)
    %U  Week number of the current year, starting with the first Sunday as the first day of the first week (00..53)
    %W  Week number of the current year, starting with the first Monday as the first day of the first week (00..53)
    %w  Day of the week (Sunday is 0, 0..6)
    %x  Preferred representation for the date alone, no time
    %X  Preferred representation for the time alone, no date
    %y  Year without a century (00..99)
    %Y  Year with century
    %Z  Time zone name
    %%  Literal “%’’ character
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Authlogic for my user authentication, and would like yo add roles
I'm using Authlogic with my Ruby on Rails App. I would like user to
I'd like to know last time a logged-in user accessed my site. I'm using
Im trying to test my successfully creates a new user after login (using authlogic).
I'm following the Railscasts tutorial on using OpenID with AuthLogic . This command: $
I'm trying to set up a simple login using AuthLogic into my User table.
We're using authlogic, and we want to have a user accounted created and the
I'm using Authlogic for authentication in my app, using the standard User and UserSession
I'm wondering how to go about using Authlogic to auto register a user who
I'm pretty new to rails and it's the first time I'm actually using authlogic

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.