Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.postgresql > #698
| Path | csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | Harry Tuttle <SOZRBLNTLEEE@spammotel.com> |
| Newsgroups | comp.databases.postgresql |
| Subject | Re: work with intervals |
| Date | Sat, 9 Jan 2016 10:07:55 +0100 |
| Lines | 34 |
| Message-ID | <dfc0vhF7oj6U1@mid.individual.net> (permalink) |
| References | <n6j1un$lbj$1@news.m-online.net> <df9esaFih4aU1@mid.individual.net> <n6q7du$lfn$1@news.m-online.net> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 7bit |
| X-Trace | individual.net XMxWWhzKe5GkPKnBSgzTHw2ZIIMd3a9VUCqerO75nLNXBY7kw= |
| Cancel-Lock | sha1:JPoevQ/3W8RQSApLTv4aQ5VCbTs= |
| User-Agent | Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.5.666 |
| In-Reply-To | <n6q7du$lfn$1@news.m-online.net> |
| Xref | csiph.com comp.databases.postgresql:698 |
Show key headers only | View raw
Magnus Warker schrieb am 09.01.2016 um 06:56:
>> select justify_hours(interval '55:43')
>> returns: 0 years 0 mons 2 days 7 hours 43 mins 0.00 secs
>
> So '55:39' means 55 hours and 39 minutes?
> Does this mean that when leaving out the microseconds the right most number is treated as minutes?
>
> What do I have to enter (in pgAdmin) if I want 53 minutes and 51 seconds?
There are several different ways of specfiying an interval:
select interval '00:53:51'
or
select interval '54H 51s'
Details in the manual: http://www.postgresql.org/docs/current/static/datatype-datetime.html#DATATYPE-INTERVAL-INPUT
> When I enter "53:51" it is saved as is. Do I have to change it to "53:51:00" then?
> The same vor timestamps:
> I enter "2016-01-09 05:26" and pgAdmin stores this value exactly as I entered it. Do I have to change it to "2016-01-09 05:26:00" then?
I don't use pgAdmin.
A timestamp is always saved with all parts (but without any formatting).
My guess is that pgAdmin simply does not display the seconds.
Back to comp.databases.postgresql | Previous | Next — Previous in thread | Next in thread | Find similar
work with intervals Magnus Warker <magnux@mailinator.com> - 2016-01-06 13:39 +0100
Re: work with intervals Harry Tuttle <SOZRBLNTLEEE@spammotel.com> - 2016-01-08 10:46 +0100
Re: work with intervals Magnus Warker <magnux@mailinator.com> - 2016-01-08 19:57 +0100
Re: work with intervals Magnus Warker <magnux@mailinator.com> - 2016-01-09 06:56 +0100
Re: work with intervals Harry Tuttle <SOZRBLNTLEEE@spammotel.com> - 2016-01-09 10:07 +0100
Re: work with intervals Magnus Warker <magnux@mailinator.com> - 2016-01-19 06:43 +0100
Re: work with intervals Dimitri Fontaine <dimitri@2ndQuadrant.fr> - 2016-01-19 10:20 +0100
Re: work with intervals Magnus Warker <magnux@mailinator.com> - 2016-01-31 06:04 +0100
csiph-web