Re: Week number
| От | Jason Earl |
|---|---|
| Тема | Re: Week number |
| Дата | |
| Msg-id | 87wv0an8tm.fsf@npa01zz001.simplot.com обсуждение исходный текст |
| Ответ на | Week number ("Wodzu" <wodzu@wodzus.prv.pl>) |
| Список | pgsql-hackers |
Both SELECT extract(week FROM now()); and SELECT extract(week FROM CURRENT_TIMESTAMP); work as expected. I don't know which is the *accepted* SQL 92 idiom, but I would bet that it isn't 'now().' Jason "Wodzu" <wodzu@wodzus.prv.pl> writes: > Hi all, > > I'm novice in PostgreSQL. > I want to obtain current week number. > Under PHP I try: > > $query = "SELECT EXTRACT(WEEK FROM NOW)"; > $result= pg_exec($dbconn,$query); > > where: $dbconn - successful conection id > But this give me an error message. > Can somebody help me? > Sorry for my english. > > Thanks in advice. > > Wodzu > > > > > > > ---------------------------(end of broadcast)--------------------------- > TIP 4: Don't 'kill -9' the postmaster
В списке pgsql-hackers по дате отправления: