Thread: Date datatype

Date datatype

From
Pablo Digonzelli
Date:
hi all,
Ca anyone send me an example how to update a date datatype?
for example   update table set birthdate = "200-01-01" doesnt work.

TIA
Pablo



Re: Date datatype

From
Együd Csaba (Freemail)
Date:
Hi,
I think the problem is the double quote you use. Try a single quote e.g.:

update yourtable set birthdate='200-01-01' where ...

This man must be a very old one... :)

I tried it using timestamp not date, but I think it should work as well.

bye,
-- cs.

-----Original Message-----
From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org]
On Behalf Of Pablo Digonzelli
Sent: Tuesday, December 21, 2004 12:41 AM
To: pgsql-sql@postgresql.org
Subject: [SQL] Date datatype

hi all,
Ca anyone send me an example how to update a date datatype?
for example   update table set birthdate = "200-01-01" doesnt work.

TIA
Pablo


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org



--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.296 / Virus Database: 265.6.0 - Release Date: 2004.12.17.


-- 
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.296 / Virus Database: 265.6.0 - Release Date: 2004.12.17.

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.296 / Virus Database: 265.6.0 - Release Date: 2004.12.17.



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.296 / Virus Database: 265.6.0 - Release Date: 2004.12.17.



Re: Date datatype

From
Achilleus Mantzios
Date:
O Pablo Digonzelli έγραψε στις Dec 20, 2004 :

> hi all,
> Ca anyone send me an example how to update a date datatype?
> for example
>     update table set birthdate = "200-01-01" doesnt work.

# update table set birthdate = '2000-01-01';

> 
> TIA
> Pablo
> 
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> 

-- 
-Achilleus



Re: Date datatype

From
"Iain"
Date:
or,

# update table set birthdate = to_date('2000-01-01','YYYY-MM-DD');

I'm not sure which is better though I tend to do it this way.

regards
Iain
----- Original Message ----- 
From: "Achilleus Mantzios" <achill@matrix.gatewaynet.com>
To: "Pablo Digonzelli" <pdigonze@sa-sanmiguel.com>
Cc: <pgsql-sql@postgresql.org>
Sent: Tuesday, December 21, 2004 5:38 PM
Subject: Re: [SQL] Date datatype


>O Pablo Digonzelli έγραψε στις Dec 20, 2004 :
>
>> hi all,
>> Ca anyone send me an example how to update a date datatype?
>> for example
>>     update table set birthdate = "200-01-01" doesnt work.
>
> # update table set birthdate = '2000-01-01';
>
>>
>> TIA
>> Pablo
>>
>>
>> ---------------------------(end of broadcast)---------------------------
>> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>>
>
> -- 
> -Achilleus
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org