General Date field criteria (1 Viewer)

Mihajlo

New member
Local time
Today, 02:22
Joined
Nov 5, 2014
Messages
4
Hello,

I have spent ages trying to solve this. I basically have General Date field (e.g. 10/1/2014 6:34:11 PM) and I want to limit the results to only a specific month and only to show reuslts after 6PM. I tried everything and still stuck. Can anyone help?

Thanks in advance!
 

CJ_London

Super Moderator
Staff member
Local time
Today, 01:22
Joined
Feb 19, 2013
Messages
16,610
by 'specific month', do you mean a specific year and month? Assuming you do then try this pseudo code

SELECT *
FROM myTable
WHERE DatePart("yyyy",myDate)=[Enter Year] AND DatePart("m",myDate)=[Enter Month (1..12)] AND DatePart("h",myDate)>=18
 

Mihajlo

New member
Local time
Today, 02:22
Joined
Nov 5, 2014
Messages
4
Thank you very much. I even tried this I just couldn't get it to work :banghead:
Thanks again! :)
 

Users who are viewing this thread

Top Bottom