On Thu, Oct 9, 2008 at 3:27 PM, Željko Filipin <[EMAIL PROTECTED]>wrote:
> On Thu, Oct 9, 2008 at 8:26 PM, Moochie <[EMAIL PROTECTED]
> > wrote:
> > Jason, You're suppose to be on vacation. Step away from the computer.
>
> Too good not to comment! :)
>
> Željko
>
As much as I'd like to have bee
On Thu, Oct 9, 2008 at 8:26 PM, Moochie <[EMAIL PROTECTED]> wrote:
> Jason, You're suppose to be on vacation. Step away from the computer.
Too good not to comment! :)
Željko
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
puts DateTime.parse('2007-12-30').strftime('%m/%d/%Y')
Worked, Thanks Andy.
Jason, You're suppose to be on vacation. Step away from the computer.
Also, I tried that one. Thanks though.
DD
On Oct 9, 12:10 pm, "andy sipe" <[EMAIL PROTECTED]> wrote:
> If the value you are getting from the dat
If the value you are getting from the database is a string, try this:
irb(main):004:0> require 'date'
=> true
irb(main):005:0> dt = DateTime.parse('2007-12-30') =>
#
irb(main):006:0> dt.year
=> 2007
irb(main):007:0> dt.day
=> 30
irb(main):008:0> dt.month
Doing it through SQL:
select date_format(now(), '%m/%d/%Y')
Replace now() with your variable and give it a whirl.
On Thu, Oct 9, 2008 at 11:08 AM, Moochie <[EMAIL PROTECTED]>wrote:
>
>
> How can I convert the following dateformate?
>
> puts "2007-12-30".strftime("%m/%d/%Y")
> puts "2007-12-30".t
There may be a slicker way to do it, but here's a method I wrote to
solve the same problem.
def dateString(date)
dateArray = Array.new
dateArray = date.split('-')
dateYear = dateArray[0]
dateMonth = dateArray[1]
dateDay = dateArray[2]
date = "#{dateMonth}/#{dateDay}/#{da