HI, Hope all is well. I have a query that is fine if I was to use the start and stop times on the hour, I'm trying to learn a bit more and try some changes so I've been trying to alter it to try and stop and start at separate times e.g. instead of between 7am to 8am trying 7:30am and 8:30am. The problem I have is trying to add 30 mins to the time . I've attached a trial database to show what I was trying.
When I use the code
The Hour turns out as expected. When I try to use DateAdd("n",30, xxx) with the above I get a date and time in the field with 30 mins added but no hour and I cant see where the date is coming from if I specify minutes with "n" DateAdd, 06/01/1900 00:30:00. What I expected was the hour o go from 7 to 7:30
Any help as always is appreciated
thanks
When I use the code
Code:
SELECT DatePart("h",TimeValue(Format([field1],"00\:00\:00"))) AS HourVal
Any help as always is appreciated
thanks