Re: [SQL] adding time to a datetime field ... how?
| От | Margarit Nickolov |
|---|---|
| Тема | Re: [SQL] adding time to a datetime field ... how? |
| Дата | |
| Msg-id | Pine.BSI.4.05L.9912171142560.11313-100000@developer.digsys.bg обсуждение исходный текст |
| Ответ на | Re: [SQL] adding time to a datetime field ... how? (Peter Eisentraut <peter_e@gmx.net>) |
| Список | pgsql-sql |
timespan type is `` time interval '@ <number> <units>' '' (try: db=>\dT), and you can convert int4 to any timespan units this way: textcat(int4_field, ' units_you_like')::timespan units can be: secs, mins, hours, days, months, years Margarit. On Fri, 17 Dec 1999, Peter Eisentraut wrote: > On 1999-12-15, Margarit Nickolov mentioned: > > > select start_time,start_time+acctsessiontime::timespan from log; > > Wow, that is really weird. I would consider it confusing behaviour at > best if an explicit cast interprets an int as seconds whereas an implicit > conversion thinks it's days. > > > -- > Peter Eisentraut Sernanders v�g 10:115 > peter_e@gmx.net 75262 Uppsala > http://yi.org/peter-e/ Sweden > > >
В списке pgsql-sql по дате отправления: