Welcome to Dream.In.Code
Become an Expert!

Join 150,034 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,581 people online right now. Registration is fast and FREE... Join Now!




comparing times

 
Reply to this topicStart new topic

comparing times

didgy58
23 Feb, 2008 - 05:45 AM
Post #1

D.I.C Head
**

Joined: 23 Oct, 2007
Posts: 217



Thanked: 1 times
My Contributions
hi guys im having a slight problem with something im looking to do a countdown timer, im comparing a record ive pulled from a databse which has a date/time field against the current time of the machine/server.

CODE

dim time,timethen, timess
timenow=Cdate(formatdatetime(now(),4))
timethen=cdate(objectrecordset("eta"))
timess=timethen-timenow
response.write(timess)



so this produces a number which isnt right its not formated and isnt the right time??
anybody have any ideas on how i could solve this problem

thanks

dan
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Comparing Times
23 Feb, 2008 - 12:45 PM
Post #2

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 9,483



Thanked: 161 times
Dream Kudos: 9075
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
What is it outputting if it isn't correct?
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 09:42PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month