hi people not sure if i am in the right place as this is a combination question i think, ok ive got my asp page using a microsoft access database, in the asp page im doings a select all from the table , and this is displaying all my info ok that works fine, i want to refine it a little though. so i thought id do it over the time
so i got this
CODE
time= FormatDateTime(Now(), vbShortTime)
time2=dateadd("h",-3,time)
and this works fine it returns the time now minus 3 hours which is what i want, when it writes it out on the screen its in the following format
hh.mm.ss.
2 things i was wondering how could i make it just bring out the hh.mm?? and secondly i would like to use this value and make a sql much like this
select * from table where sta >= time 2
ive tried it but get a datatype mistmatch error,
sta is a date/time in the database, should i consider changing it to text and maybe it will work?? or is it because ive got the seconds in my time2 and need to change it to just hour and minute?
any help would be very much appriciated
thanks
dan