dbTalk Databases Forums  

date function in ingres

comp.databases comp.databases


Discuss date function in ingres in the comp.databases forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
malti
 
Posts: n/a

Default date function in ingres - 06-23-2004 , 03:50 PM






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

Reply With Quote
  #2  
Old   
Christian Maslen
 
Posts: n/a

Default Re: date function in ingres - 06-24-2004 , 05:25 PM






Hi Malti,

Quote:
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.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.