[thelist] Converting dates
darren
darren at web-bitch.co.uk
Thu Feb 28 10:35:01 CST 2002
On 28 February 2002 at 16:04:19, Faye Tarzwell(FayeC) <ftarzwell at fayec.com> wrote:
FTF> Hi,
FTF> Can anybody tell me where to find specific information on converting
FTF> dates for use in ASP?
the vbscript docs??
http://download.microsoft.com/download/winscript56/Install/5.6/W982KMeXP/EN-US/scrdoc56en.exe
have a look at the dateAdd and DatePart functions.
FTF> I have a table with a field for date which is filled during registration
FTF> using the date of the day in which that took place (now()).
FTF> I want to make a date comparison using that field.
FTF> Something like
FTF> datefield < now - 1 year...
FTF> Any tips?
how about:
if dateField < DateAdd("yyyy", -1, Now())
also this is the sort of thing that you can get the database to do when
you're doing your select:
select
*
from
RegTable
where
DateField < DateAdd("yyyy", -1, GetDate())
would work in sqlserver. might have to use the datepart function in other
db's.
hth,
darren.
More information about the thelist
mailing list