Created
          March 20, 2012 11:19 
        
      - 
      
- 
        Save nuwansh/2134187 to your computer and use it in GitHub Desktop. 
    Convert timestamp to normal format
  
        
  
    
      This file contains hidden or 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
    
  
  
    
  | 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