Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR RUBY

rails change date format

date = Date.new

date.strftime('%d/%m/%Y') # => "25/03/2022"

date.strftime('%Y/%m/%d') # => "2022/03/25"
 
PREVIOUS NEXT
Tagged: #rails #change #date #format
ADD COMMENT
Topic
Name
7+7 =