pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Katka a Daniel Dunajsky <daniel_katka@hotmail.com>
To: pgsql-sql@postgresql.org
Subject: Time formating
Date: Fri, 02 May 2003 16:33:56 -0600
Message-ID: <Law12-F49x4XFKpRcTC00007e31@hotmail.com> (raw)

Hello All,

This question is related to my preceeding question.

How to format a value 7383 to represent 02H:03M:03SS (hours-minutes-seconds) 
using postgresql?

I have this query:

SELECT SUM (session_length))/60)/60 AS "Total",
FROM   user_sessions
WHERE  TO_CHAR(session_start, 'YYYY-MM') = '2003-04';

If session_length = 7383 I will receive 2.


I have received advice that I should use . and it will work with

select 5./2, however how to do it when I have a variable?

Thank you for your time.

Daniel



_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*  
http://join.msn.com/?page=features/junkmail




view thread (2+ messages)  latest in thread

Message-ID: <Law12-F49x4XFKpRcTC00007e31@hotmail.com>
Permalink:  ../Law12-F49x4XFKpRcTC00007e31@hotmail.com/
Also on:    postgresql.org/message-id/Law12-F49x4XFKpRcTC00007e31@hotmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: daniel_katka@hotmail.com
  Subject: Re: Time formating
  In-Reply-To: <Law12-F49x4XFKpRcTC00007e31@hotmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox