Subject: Re: How to change date format from Y/m/d to Y-m-d
From: fighterlyt <fighter.lyt gmail.com>
Date: Wed, 20 Jul 2011 00:17:40 +0900
References: 385501
In-reply-to: 385501
в 2011ǯ07·î19Æü 21:42, Annie smith ¼ÌÆ»:
> Hi All,
>
> Do you know how to change date format from Y/m/d to Y-m-d in ruby?
>
> Thanks!
>
def convert!(time)
time=times.split("/").join("-")
end
convert!("2011/11/11)