List:General Discussion« Previous MessageNext Message »
From:Josh Abrams Date:February 5 2000 8:41pm
Subject:TIMESTAMP conversion question
View as plain text  
Hi again,

How do I get and store a TIMESTAMP value of a date 30 days hence? 

The ADDDATE(NOW(), INTERVAL 30 DAY) returns a DATETIME value. When I
execute the following insert, I get a TIMESTAMP value of the
current time (where EXPIRES is of type TIMESTAMP(14):

insert into some_table (EXPIRES) values (ADDDATE(NOW(), INTERVAL 30 DAY));

This may be happening because ADDDATE returns the DATETIME or DATE value
which isn't getting converted to TIMESTAMP format and therefore I get the
default TIMESTAMP value - the current time. I'm not sure.

Any ideas?

Thanks again,

Me

Thread
Contacting Anthony CurtisRobert Gehrig5 Feb
  • TIMESTAMP conversion questionJosh Abrams5 Feb
    • Re: TIMESTAMP conversion questionFaisal Nasim6 Feb
      • Re: TIMESTAMP conversion questionJosh Abrams6 Feb
        • TIMESTAMP conversion questionJosh Abrams7 Feb
          • Re: TIMESTAMP conversion questionSteve Ruby7 Feb
            • Re: TIMESTAMP conversion questionJosh Abrams7 Feb
              • Re: TIMESTAMP conversion questionSteve Ruby7 Feb
                • Re: TIMESTAMP conversion questionJosh Abrams7 Feb