<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Forum PostgreSQL - Porównanie TIMESTAMP i curreent_date - 1]]></title>
	<link rel="self" href="http://forum.postgresql.org.pl/extern.php?action=feed&amp;tid=302&amp;type=atom"/>
	<updated>2009-09-29T15:24:27Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.postgresql.org.pl/viewtopic.php?id=302</id>
		<entry>
			<title type="html"><![CDATA[Odp: Porównanie TIMESTAMP i curreent_date - 1]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=1342#p1342"/>
			<content type="html"><![CDATA[OK działa wielkie dzięki 
zamiast zmieniać za każdym razem warunek[code]
SELECT max(ilosc)
FROM produkty
WHERE data_godzina >= '2009-09-28 00:00:00' and data_godzina <='2009-09-28 23:59:59'
[/code]
mam zawsze aktualne "wczorajsze" podsumowanie[code]
SELECT max(ilosc)
FROM produkty
WHERE to_date(to_char(data_godzina ,'MM-DD-YYYY'),'MM-DD-YYYY) = current_date - 1
[/code]]]></content>
			<author>
				<name><![CDATA[WitekS]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=760</uri>
			</author>
			<updated>2009-09-29T15:24:27Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=1342#p1342</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: Porównanie TIMESTAMP i curreent_date - 1]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=1341#p1341"/>
			<content type="html"><![CDATA[No to dlatego pisze 'jakims' date_partem :).
Może tak
[code]
to_date(to_char(timestamp ,'MM-DD-YYYY'),'MM-DD-YYYY)
[/code]]]></content>
			<author>
				<name><![CDATA[rski]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=26</uri>
			</author>
			<updated>2009-09-29T13:12:50Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=1341#p1341</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: Porównanie TIMESTAMP i curreent_date - 1]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=1340#p1340"/>
			<content type="html"><![CDATA[Problem jest taki że date_part z tego co czytałem zwraca z timestamp pojedyncze wartości np rok, miesiąc itd więc i tak nie porównam tego z current_date - 1 czyli 2009-09-28...]]></content>
			<author>
				<name><![CDATA[WitekS]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=760</uri>
			</author>
			<updated>2009-09-29T11:07:59Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=1340#p1340</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Odp: Porównanie TIMESTAMP i curreent_date - 1]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=1339#p1339"/>
			<content type="html"><![CDATA[Wyciągnąć jakimś date_partem datę z timestampa i porównać. Masz z tym jakiś problem?]]></content>
			<author>
				<name><![CDATA[rski]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=26</uri>
			</author>
			<updated>2009-09-29T10:09:30Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=1339#p1339</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Porównanie TIMESTAMP i curreent_date - 1]]></title>
			<link rel="alternate" href="https://forum.postgresql.org.pl/viewtopic.php?pid=1338#p1338"/>
			<content type="html"><![CDATA[Mam tabelę która zawiera kolumnę potrzebuję wybrać wszystkie rekordy np wczorajsze czyli porównać pole timestamp do current_date - 1. Jak to najprościej zrobić?]]></content>
			<author>
				<name><![CDATA[WitekS]]></name>
				<uri>https://forum.postgresql.org.pl/profile.php?id=760</uri>
			</author>
			<updated>2009-09-29T09:57:57Z</updated>
			<id>https://forum.postgresql.org.pl/viewtopic.php?pid=1338#p1338</id>
		</entry>
</feed>
