Skip navigation links

MySQL Forums :: Newbie :: pull records from the last 24 hours without hardcoding datetime?


Advanced Search

pull records from the last 24 hours without hardcoding datetime?
Posted by: John Burnette ()
Date: May 09, 2008 08:30AM

I searched the forum and was unable to find a thread that covered this.

Im writing an ASP.NET/C# web app for a registration form, and am writing a record to a table that I need to pull later for reference(things like who download a particular software, etc.)

I have everything working perfectly, I just need to be able to query the table and only recieve back the records that have been entered in the last 24 hours. Unfortunately I cannot hardcode the date because the stats page that lists the records needs to constantly update the information so others can view whats happening.

Im using Now() to insert the date and time in a field, I just cant seem to find how to compare those, and only pull the ones in the last 24 hours.

Thanks in advance.

Options: ReplyQuote


Subject Written By Posted
pull records from the last 24 hours without hardcoding datetime? John Burnette 05/09/2008 08:30AM
Re: pull records from the last 24 hours without hardcoding datetime? Peter Brawley 05/09/2008 08:51AM
Re: pull records from the last 24 hours without hardcoding datetime? John Burnette 05/09/2008 08:55AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.