Last active
December 28, 2015 21:08
-
-
Save ravionrails/7562044 to your computer and use it in GitHub Desktop.
to get datetime format 20th Nov 2013 in rails 4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
date_time_obj = Time.now | |
date_time_obj.strftime("%d#{ordinalize[date_time_obj.day]} %b %Y") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment