Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP compare timestamps

Status
Not open for further replies.

markshen2004

Programmer
Jun 9, 2004
89
CA
I want to need if ASP have function to generate timestamp and compare timestamps.

I want to samething show after exactly time that include year,month,day,hour,minite and second. Thanks
 
you can generate a timestamp using Now()

for comparing you could write a function to return a value easily enough. how exactly would depend on what values you wanted to return

number of weeks, days, hours, minutes, seconds etc

Chris.

Indifference will be the downfall of mankind, but who cares?
A website that proves the cobblers kids adage.
Nightclub counting systems

So long, and thanks for all the fish.
 
Sorry I do not understand what you mean.

I want to a imagine showed on th site after 2004,Aug,25,8am and 30 minuite. do you know how to compare the time with current time? now() can get current time only.

Thanks
 
time() --> returns time
date() --> returns date
now() --> returns date + time
now()-time() --> returns date()
now()-date() --> returns time()

so .. now()-RS("TimeStamp") gives you the difference in current time minus your timestamp value, in the form of day decimal meaning exactly 24 hours ago would be 1.0 1 day and 6 hours would be 1.25

doing decimal conversion on the time difference will give you the time difference/date difference down to milliseconds if you want it to.



[thumbsup2]DreX
aKa - Robert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top