pg.ddx.io pgsql-interfaces@postgresql.org mailing list archivehelp / color / mirror / Atom feed
How does operation with data types time??? 2+ messages / 2 participants [nested] [flat]
* How does operation with data types time??? @ 1999-06-30 03:33 Pablo Saul Salazar - CESERCOMP <ssalazar@goliat.espol.edu.ec> 0 siblings, 1 reply; 2+ messages in thread From: Pablo Saul Salazar - CESERCOMP @ 1999-06-30 03:33 UTC (permalink / raw) To: pgsql-interfaces Hello I have another question, please should someone help me?? my question is : How may does operation in fields of type "time"?? for example , i want does the following query: lab=>update ctrl set curren_time = current_time - 3; is tell o want subtract three minutes to values in field current_time that is of tipe time, Is posible this??? Please help me Pablo Salazar Loaiza Asistente de Redes CESERCOMP-ESPOL ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: [INTERFACES] How does operation with data types time??? @ 1999-07-01 02:45 Thomas Lockhart <lockhart@alumni.caltech.edu> parent: Pablo Saul Salazar - CESERCOMP <ssalazar@goliat.espol.edu.ec> 0 siblings, 0 replies; 2+ messages in thread From: Thomas Lockhart @ 1999-07-01 02:45 UTC (permalink / raw) To: Pablo Saul Salazar - CESERCOMP <ssalazar@goliat.espol.edu.ec>; +Cc: pgsql-interfaces > I have another question, please should someone help me?? Sure. I understand this one, but didn't quite follow the previous question. Sorry... > How may does operation in fields of type "time"?? > for example , i want does the following query: > lab=>update ctrl set curren_time = current_time - 3; > is tell o want subtract three minutes to values in field current_time that > is of tipe time, It looks to me that we are missing a math routine to make this transparent (at least once you make the "3" into "timespan '3 min'"). But there is a workaround: postgres=> select time(datetime('today', time '3:30') - timespan '3 min'); time -------- 03:27:00 (1 row) Hope this helps... - Thomas -- Thomas Lockhart lockhart@alumni.caltech.edu South Pasadena, California ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~1999-07-01 02:45 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 1999-06-30 03:33 How does operation with data types time??? Pablo Saul Salazar - CESERCOMP <ssalazar@goliat.espol.edu.ec> 1999-07-01 02:45 ` Thomas Lockhart <lockhart@alumni.caltech.edu>
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