type casting: varchar to date

Поиск
Список
Период
Сортировка
Искать

type casting: varchar to date

От:
"J.Fernando Moyano" <txinete@wanadoo.es>
Дата:

Is there some way to do something like this ?? :

crate table t (
a	varchar(12),
b	date
);

select (a::date-b) from t;

ERROR: cannot cast type 'varchar' to 'date'.


Thanks ....

-- 
Fer

Re: type casting: varchar to date

От:
Karel Zak <zakkr@zf.jcu.cz>
Дата:
On Tue, 6 Feb 2001, J.Fernando Moyano wrote:

> 
> Is there some way to do something like this ?? :
Yes,
select to_timestamp('hello 02-06-2001', '"hello "MM-DD-YYYY'); 
	Karel


FAQ