Timezone

Timezone

am 30.07.2002 22:32:58 von angelo.rigo

Hi

i would like to show the date a record was entered i choose my data type
to be timezone , how can i change the timezone to match the Brazilian timez=
one
format?

Thank?s in advance
=C2ngelo Rigo

________________________________________
A busca mais veloz e precisa da internet. Acesse agora: http://www.zoom.com=
..br.



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

Re: timezone

am 01.08.2002 20:44:52 von Josh Berkus

Angelo,

> So simple!
> thank?s Josh
>=20
> in my case i do :
> -- SELECT nome, data FROM aprovados order by nome asc --
> -- printf ("%s%s
> ",$myrow[nome], $myrow[data]); --
>=20
> the select goes like this?
>=20
> -- SELECT nome, data to char (??some_date??, 'DD.MM.YYYY');FROM aprovados
> order by nome asc --

that would be:

SELECT nome, to_char(data, 'DD.MM.YYYY') AS data=20
FROM aprovados
ORDER BY nome ASC;

--=20
-Josh Berkus

______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh@agliodbs.com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

Re: timezone

am 01.08.2002 21:09:19 von Josh Berkus

Angelo,

> how can i display 20 results at a time and give a link to the next 20 or
> 50 or whatever records i do have on the database?

Use LIMIT and OFFSET, which work the same in Postgres and MySQL:

SELECT nome, to_char(data, 'DD.MM.YYYY') AS data
FROM aprovados
ORDER BY nome ASC
LIMIT 20 OFFSET 0;

then

SELECT nome, to_char(data, 'DD.MM.YYYY') AS data
FROM aprovados
ORDER BY nome ASC
LIMIT 20 OFFSET 20;

etc.

--=20
-Josh Berkus

______AGLIO DATABASE SOLUTIONS___________________________
Josh Berkus
Complete information technology josh@agliodbs.com
and data management solutions (415) 565-7293
for law firms, small businesses fax 621-2533
and non-profit organizations. San Francisco


---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Re: timezone

am 01.08.2002 21:48:03 von angelo.rigo

it displays 20 but have no link to next records
how can i add it?

'>'-- Mensagem Original --
'>'From: Josh Berkus
'>'Reply-To: josh@agliodbs.com
'>'To: angelo.rigo@globo.com
'>'Subject: Re: [PHP] timezone
'>'Date: Thu, 1 Aug 2002 12:09:19 -0700
'>'Cc: pgsql-php@postgresql.org
'>'
'>'
'>'Angelo,
'>'
'>'> how can i display 20 results at a time and give a link to the next
20 or
'>'> 50 or whatever records i do have on the database?
'>'
'>'Use LIMIT and OFFSET, which work the same in Postgres and MySQL:
'>'
'>'SELECT nome, to_char(data, 'DD.MM.YYYY') AS data
'>' FROM aprovados
'>' ORDER BY nome ASC
'>' LIMIT 20 OFFSET 0;
'>'
'>'then
'>'
'>'SELECT nome, to_char(data, 'DD.MM.YYYY') AS data
'>' FROM aprovados
'>' ORDER BY nome ASC
'>' LIMIT 20 OFFSET 20;
'>'
'>'etc.
'>'
'>'--
'>'-Josh Berkus
'>'
'>'______AGLIO DATABASE SOLUTIONS___________________________
'>' Josh Berkus
'>' Complete information technology josh@agliodbs.com
'>' and data management solutions (415) 565-7293
'>' for law firms, small businesses fax 621-2533
'>' and non-profit organizations. San Francisco
'>'
'>'
'>'---------------------------(end of broadcast)---------------------------
'>'TIP 4: Don't 'kill -9' the postmaster


________________________________________
A busca mais veloz e precisa da internet. Acesse agora: http://www.zoom.com=
..br.



---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org