Solved

JQuery CountDown

Posted on 2010-08-26
7
795 Views
Last Modified: 2012-05-10
Hi there,

The following is the datetime field value stored in an SQLserver database in Brazil:  2010-08-26 21:46:42.380

I parsed it inside SQLserver, to be able to get the year, month, hour and minute.

Now I need to fill the "until" countdown parameter in the Jquery CountDown Javascript package... the link to it is below.

I did like below:

until: new Date(myYear, myMonth - 1, myHour, myMinute + 40), timezone: -3

because I want to give 40minutes, from the time stored, to the countdown timer.  

The number that appears has NOTHING to do with 40minutes after the time stored. How should I understand/fix that?

Thanks!
Link: http://keith-wood.name/countdownRef.html#labels
0
Comment
Question by:fskilnik
  • 4
  • 3
7 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 33538233
Try :

until: new Date(myYear, myMonth - 1, myHour, myMinute + 40, 0), timezone: -3
0
 

Author Comment

by:fskilnik
ID: 33538372
Nope... it appears:  0 hours, 0 min and 0 seconds ...
0
 
LVL 82

Expert Comment

by:leakim971
ID: 33538384
the day is missing too :

until: new Date(myYear, myMonth - 1, myDay, myHour, myMinute + 40, 0), timezone: -3

please confirm myYear, myMonth, MyDay myHour and MyMinute is set somewhere (from the database)
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:fskilnik
ID: 33538452
Sorry, but in the code is not missing (my fault when typing here at EE, only)... have a look:

until: new Date(<%=(rsParsingStartTimes.Fields.Item("YearStart").Value)%>, <%=(rsParsingStartTimes.Fields.Item("MonthStart").Value)%>-1 , <%=(rsParsingStartTimes.Fields.Item("DayStart").Value)%>, <%=(rsParsingStartTimes.Fields.Item("HourStart").Value)%>, <%=(rsParsingStartTimes.Fields.Item("MinuteStart").Value)%> +40,0), timezone: -3});
0
 

Author Comment

by:fskilnik
ID: 33538560
Perhaps the problem is NOT related to that, leakim... now I´m checking!
0
 

Author Comment

by:fskilnik
ID: 33538643
That´s it... it WASN´T that at all, it was a problem of reading the recordset...

Well, thanks a LOT, anyway.

See you in my next difficulties, I hope.  

Best Regards, fskilnik.
0
 
LVL 82

Expert Comment

by:leakim971
ID: 33540976
Thanks a lot for the points! No problem for the next steps, have fun!
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

by Julian Matz As of jQuery (http://jquery.com/) 1.4 the .live() method (http://api.jquery.com/live/) supports custom events as well as some standard JavaScript events that it previously didn't support. Among these is the submit event. Unlike …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now