Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / General DB Topics / General DB Topics / June 2004

Tip: Looking for answers? Try searching our database.

date function in ingres

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
malti - 23 Jun 2004 21:50 GMT
I have date as yyyy-mm-dd HH-MM-SS in ingres database. I want to
select only yyyy-mm-dd and not the time. How do I do it? Please help.

Malti
Christian Maslen - 24 Jun 2004 23:25 GMT
Hi Malti,

> I have date as yyyy-mm-dd HH-MM-SS in ingres database. I want to
> select only yyyy-mm-dd and not the time. How do I do it? Please help.

You can use the date_trunc function. Eg:

select date('now') as date_with_time
      ,date_trunc('day',date('now')) as date_only

The doco can be found at:

http://esupport.ca.com/index.html

Christian.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.