RE: Find all the dates in the calendar week?
От | Andrew Snow |
---|---|
Тема | RE: Find all the dates in the calendar week? |
Дата | |
Msg-id | NHEALMDKDACEIPBNOOOCMEPMCGAA.als@fl.net.au обсуждение исходный текст |
Ответ на | Find all the dates in the calendar week? (Stephane Bortzmeyer <bortzmeyer@pasteur.fr>) |
Ответы |
Re: Find all the dates in the calendar week?
RE: Find all the dates in the calendar week? RE: Find all the dates in the calendar week? |
Список | pgsql-general |
> I have a table of events with a column which stores datetimes. I > want to check > if a datetime is inside the current calendar week (i.e. from the previous > monday to the next sunday). The purpose is to SELECT all the > events of the > week. See this posting: > -----Original Message----- > Sent: Tuesday, 4 July 2000 6:01 PM > To: pgsql-general@postgresql.org > Subject: Re: [GENERAL] number of weeks > > -- Week number of the year > to_char(CURRENT_TIMESTAMP, 'WW'); > -- Day number of the year > to_char(CURRENT_TIMESTAMP, 'DDD'); > > See the documentation at: > http://www.comptechnews.com/~reaster/postgres/functions2976.htm So, something like: SELECT event FROM events WHERE to_char(CURRENT_TIMESTAMP, 'ww') = to_char(eventdate, 'ww'); Regards, Andrew Snow
В списке pgsql-general по дате отправления: