Date.strptime with format '%A, %B %d, %Y' : strptime « Date « Ruby






Date.strptime with format '%A, %B %d, %Y'

 
require 'date'
 
word_date = '%A, %B %d, %Y'
puts Date.strptime('Wednesday, January 10, 2001', word_date).to_s

 








Related examples in the same category

1.Date.strptime
2.Date.strptime with format '%d/%m/%y'
3.Date.strptime with format '%m/%d/%Y'