<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forum PostgreSQL - Problem z date/time type]]></title>
	<link rel="self" href="http://forum.postgresql.org.pl/extern.php?action=feed&amp;tid=402&amp;type=atom"/>
	<updated>2010-02-17T07:06:18Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.postgresql.org.pl/viewtopic.php?id=402</id>
		<entry>
			<title type="html"><![CDATA[Odp: Problem z date/time type]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=1852#p1852"/>
			<content type="html"><![CDATA[Cześć,

łatwiej jest ustawić kolumnę w tabeli jako 
type timestamp(0) without time zone.
O tyle wygodniejsze rozwiązanie, że przy każdym insert ... now(), wpisuje do tabeli wartości YYYY-MM-DD GG:MM:SS.

Dzięki.
Pozdrawiam.]]></content>
			<author>
				<name><![CDATA[gintor]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=959</uri>
			</author>
			<updated>2010-02-17T07:06:18Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=1852#p1852</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: Problem z date/time type]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=1846#p1846"/>
			<content type="html"><![CDATA[[quote=gintor]Cześć,

mam taki problem potrzebuje daty w formacie
'RRRR-MM-DD GG:MM:SS'.
Oczywiście da się to zrobić w funkcji, subtringiem wyciąć nie potrzebne rzeczy, ale może wiecie jak to zrobić używajac 'without time zone' ???

Przykładowo select now() daje 2010-02-11 13:00:00.989760+01.

a ma być   2010-02-11 13:00:00 

Pozdrawiam.[/quote]

np. tak:
select to_char(now(), 'YYYY-MM-DD  HH24:MI:SS')

Pozdrawiam]]></content>
			<author>
				<name><![CDATA[6nom]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=971</uri>
			</author>
			<updated>2010-02-16T15:35:52Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=1846#p1846</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Problem z date/time type]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=1845#p1845"/>
			<content type="html"><![CDATA[Cześć,

mam taki problem potrzebuje daty w formacie
'RRRR-MM-DD GG:MM:SS'.
Oczywiście da się to zrobić w funkcji, subtringiem wyciąć nie potrzebne rzeczy, ale może wiecie jak to zrobić używajac 'without time zone' ???

Przykładowo select now() daje 2010-02-11 13:00:00.989760+01.

a ma być   2010-02-11 13:00:00 

Pozdrawiam.]]></content>
			<author>
				<name><![CDATA[gintor]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=959</uri>
			</author>
			<updated>2010-02-16T12:07:25Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=1845#p1845</id>
		</entry>
</feed>
