Always_Learning
Registered User.
- Local time
- Today, 15:43
- Joined
- Oct 7, 2013
- Messages
- 71
Hi There,
Can someone help please.
I have taken over a database and I cannot change the table structures.
The backend database is MS Sql Server.
I need to build a couple of queries but cannot get them to work.
In a table I have 2 fields EntryDate & EntryTime both are datetime.
The contents in the database for EntryDate is something like "2013-12-04 00:00:00.000" and for EntryTime it's "2000-01-01 08:40:00.000"
As you can see the dates are in one field and the time is in the other. This is causing me quite a few issues.
The 2 queries I need to build are:
Show all records entered in the last 24 hours.
So if the time is now 14:00 show me all records that have been entered from yesterday at 14:00 to 14:00 today.
I also need to be able to show what has been entered from yesterday at 22:00 to today at 13:00
I know a few of you will think this is simple but it's had me pulling my hair out.
Thanks for any help you can give I really appreciate it.
Best Regards,
Can someone help please.
I have taken over a database and I cannot change the table structures.
The backend database is MS Sql Server.
I need to build a couple of queries but cannot get them to work.
In a table I have 2 fields EntryDate & EntryTime both are datetime.
The contents in the database for EntryDate is something like "2013-12-04 00:00:00.000" and for EntryTime it's "2000-01-01 08:40:00.000"
As you can see the dates are in one field and the time is in the other. This is causing me quite a few issues.
The 2 queries I need to build are:
Show all records entered in the last 24 hours.
So if the time is now 14:00 show me all records that have been entered from yesterday at 14:00 to 14:00 today.
I also need to be able to show what has been entered from yesterday at 22:00 to today at 13:00
I know a few of you will think this is simple but it's had me pulling my hair out.
Thanks for any help you can give I really appreciate it.
Best Regards,