Unix Technical Forum

DateTime function

This is a discussion on DateTime function within the Informix forums, part of the Database Server Software category; --> Need help with creating a query that fetches data from the previous day. For example, I need to see ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 07:51 AM
Jay
 
Posts: n/a
Default DateTime function

Need help with creating a query that fetches data from the previous
day. For example, I need to see all of yesterdays data from a table.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-20-2008, 07:51 AM
Thomas Ronayne
 
Posts: n/a
Default Re: DateTime function

If you have a date column in the table, just select blah from blah where
dat_col = today - 1.

Jay wrote:

>Need help with creating a query that fetches data from the previous
>day. For example, I need to see all of yesterdays data from a table.
>
>

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-20-2008, 07:52 AM
Alain Pelletier
 
Posts: n/a
Default Re: DateTime function

Hi,

You can try

select * from table wher col = today -4


"Jay" <jlee00_99@yahoo.com> a écrit dans le message de news:
3ea71bf0.0410081342.2137e545@posting.google.com...
> Need help with creating a query that fetches data from the previous
> day. For example, I need to see all of yesterdays data from a table.



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:47 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com