List:General Discussion« Previous MessageNext Message »
From:Christian Mack Date:September 14 1999 6:45pm
Subject:Re: Saving dates as YYYYMMDD
View as plain text  
"Claudia M. Castaneda" wrote:
> 
> Is it possible to have the DB save the date as YYYYMMDD and the time as
> HHMMSS using the date and time types respectively and not return a
> formated string, i.e "YYYY-MM-DD" or "HH-MM-SS" ?
> 
> ---
> Claudia M. Castaneda

Hi Claudia

Thats easy :)
CREATE TABLE time_table (date_field DATE, time_field TIME, datetime_field DATETIME);
INSERT INTO time_table VALUES( NOW(), NOW(), NOW() );
SELECT date_field + 0, time_field + 0, datetime_field + 0 FROM time_table;

Tschau
Christian

Thread
Saving dates as YYYYMMDDClaudia M. Castaneda14 Sep
  • Re: Saving dates as YYYYMMDDMike Machado14 Sep
    • Re: Saving dates as YYYYMMDDMartin Ramsch14 Sep
  • Re: Saving dates as YYYYMMDDChristian Mack14 Sep
    • Re: Saving dates as YYYYMMDDDaniel E. White15 Sep
      • Re: Saving dates as YYYYMMDDMichael Widenius17 Sep
  • Re: Saving dates as YYYYMMDDChristian Mack15 Sep
    • Re: Saving dates as YYYYMMDDMartin Ramsch16 Sep
      • Re: Saving dates as YYYYMMDDMichael Widenius17 Sep