Skip to content

Instantly share code, notes, and snippets.

@nuwansh
Created March 20, 2012 11:19
Show Gist options
  • Save nuwansh/2134187 to your computer and use it in GitHub Desktop.
Save nuwansh/2134187 to your computer and use it in GitHub Desktop.
Convert timestamp to normal format
def convert_date(date_string)
if date_string.present?
date = Time.parse(date_string.to_s)
date.strftime("%b %d, %Y")
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment