Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Comparing dates - need help

 [1/6] from: carlos:lorenz:gm:ail at: 24-Apr-2009 9:34


Hi list, Need some help on this. Canīt understand why NOW is greater then TO-DATE a/2.
>> a: [{0000145359} {2009-04-24 09:30:00} {2009-04-24 12:30:00} {100}] >> a/2
== "2009-04-24 09:30:00"
>> to-date a/2
== 24-Apr-2009/9:30
>> now
== 24-Apr-2009/9:27:13-3:00
>> now >= to-date a/2
== true
>>
-- Carlos Lorenz Unidade Lorenz Ltda www.revistaeletronica.com.br (11) 4034 1971 (11) 7100 1540 pessoal

 [2/6] from: petr:krenzelok:seznam:cz at: 24-Apr-2009 14:44


Hello, maybe because of timezone? ->> n: to-date "24-Apr-2009/14:41:00+2:00" == 24-Apr-2009/14:41+2:00
>> n > now
== false
>> now
== 24-Apr-2009/14:42:52+2:00 -pekr-

 [3/6] from: gregg::pointillistic::com at: 24-Apr-2009 8:37


Hi Carlos, CL> Need some help on this. Canīt understand why NOW is greater then CL> TO-DATE a/2. As Petr said, it's because of the timezone. Consider the values if you compare them as UTC times. -- Gregg

 [4/6] from: carlos::lorenz::gmail::com at: 24-Apr-2009 14:12


Thanks Petr and Greg for the help. Really addin timezone to the date solves the question. Cheers 2009/4/24 Carlos Lorenz <carlos.lorenz-gmail.com>
> Hi list, > Need some help on this. Canīt understand why NOW is greater then TO-DATE
<<quoted lines omitted: 15>>
> (11) 4034 1971 > (11) 7100 1540 pessoal
-- Carlos Lorenz Unidade Lorenz Ltda www.revistaeletronica.com.br (11) 4034 1971 (11) 7100 1540 pessoal

 [5/6] from: brock::kalef::innovapost::com at: 24-Apr-2009 9:10


If you want to ignore the timezone... (to-date join now/date ["/" now/time]) >= to-date a/2

 [6/6] from: carlos::lorenz::gmail::com at: 27-Apr-2009 10:23


Brock, Nice tip, thanks ! 2009/4/24 Brock Kalef <brock.kalef-innovapost.com>
> If you want to ignore the timezone... > (to-date join now/date ["/" now/time]) >= to-date a/2
<<quoted lines omitted: 19>>
> To unsubscribe from the list, just send an email to > lists at rebol.com with unsubscribe as the subject.
-- Carlos Lorenz Unidade Lorenz Ltda www.revistaeletronica.com.br (11) 4034 1971 (11) 7100 1540 pessoal

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted