Countdowns, and generally speaking comparisons with Today’s date, have been a recurring theme on my blog.
SharePoint 2010 hasn’t brought much improvement to the “Today” issue, so the workarounds published on my blog in 2008 remain a good reference, either the one I wrote for Data View Web Parts or Alexander Bautz’ follow up article for list views.
A year ago, I blogged about two other solutions, one relying on jQuery, the other on Flash and ClockLink.com (the demos are not active anymore).
Today I am showing two new examples that are much simpler than the previous ones. The live demo is here:
Why much simpler? Because the only thing you need in the page is my Text to HTML script – the exact same that is used for color coding calendars. The calculated column will take care of all the rest (for example the formula to calculate the difference between target date and Today, or the color selection).
Note that there’s a key difference between the two examples: the “Countdown” column relies on the local time of your computer, while the “TimeAndDate” column pulls today’s time from TimeAndDate.com. In the past, I have already highlighted this important choice (for example, don’t use the local computer time if you’re building an auctions site!).
The drawback of this new approach is redundancy – the current date is calculated for each item. So I would recommend to only use it for views with few items.
You’ll notice that the column filters also render the HTML (cf. above screenshot). That’s because the page uses a custom version of my Text to HTML. It is still work in progress, so please don’t copy this script!
Pingback: Tweets that mention Live demo: countdown/countup « Path to SharePoint -- Topsy.com
Great job again on this! Looks like the solution is much cleaner than some previous one’s you have posted. Struggling a bit with the formula in the CC, but very impressive.
Thanks Larry. My plan is to build a formula generator, just like I did for color coded calendars. This will allow people to get the formula without any effort!
OK I have been up since 3 AM attending SharePoint Saturday EMEA so maybe I am just too tired and missed it, but where can I get the formula?
I went to the demo site but can’t get to list settings of course to see the formula so. . .?
I could really use this in the School site my daughter uses.
Trudy: as you know, in SharePoint comparing a date with today is not an easy task.
To reach the result in the demo, I had to find not one, but several workarounds. I have reached a point where I can show a decent demo, but not yet offer the solution to my readers.
I know that you’re already using several of my solutions, including the Text to HTML script, so I’ll send you the formula, if you’d like to be a beta tester.
I’ll continue working on a final solution. In the meantime making a live demo available allows me to collect some useful feedback.
Think you’ve got a great feature on your hands there which would definitely be very useful.
I’m interested in becoming a beta tester – are you still looking for people for this?
Rob, I’ve sent you the formulas. Let me know how it goes!
Christophe, can you resend me the countdown formula? I am able to get the time since formula to work beautifully, but the countdown formula is giving me a syntax error.
This is the one I really need and I am wondering if I when I saved it I accidentally messed it up.
I am hoping to use it in the School site. I want to count down the days till an assignment is due using my column named [Due Date]. If I could get this to work it would be the final piece on the school site, and would just make it something really useful.
Also, does the Due Date column need to be Date only, or date and time, or does it even matter. I am so close and it is driving me crazy!
The Time Since formula using the internet time works so simply, and so nicely that I have started to use it on our family site to count down to holidays or the next big event for the family. The kids get a real kick out if it!
Thanks for your help.
When will the “Today” issue be resolved??? Argh.
I have a requirement for a Project list. They want sort of a double indicator, where for each project, the duration of the project period (end date minus start date) and % complete can be represented against each other in bar-style indicators.
This is no problem for % complete- I have several of your scripts to use for that. 🙂 But the duration indicator compares its completion to the current date (requiring real-time TODAY value). Grrr.
The ability to see the project’s % complete in a bar-style indicator right on top of a similar bar indicator showing how much time is left in he project period (or NOt left)would be very valuable.
Can you send me the script of this countdown as i am currently struggling in getting dynamic “”today”” date times which is for making email notification.
Many thanks for your help.
For the instructions, check out the latest updates on my blog:
Note that the method will render a countdown in the browser, but it won’t update the SharePoint list. I am afraid this won’t address your need to send notifications.
After the count down work in my list, will the result be automatically updated?
or just like [today] which keeps static, and we have to update the list item to show the new result?
Thank you very much for your great help, brilliant work!
As I said, the countdown doesn’t update the list. You don’t need to update the list item either. Every time you open the Web page, the countdown calculates the difference between the target date stored in the list and the local date provided by the computer.
May I have this script as well? I’d like to try it out too! 🙂
Kristina, I have published it. Check out my recent posts tagged “countdown” and the SharePoint User Toolkit for details.
I love the countdown in the tool kit, it is so easy to use and is such a great much needed answer to the count down problem. It takes creating dashboards and visualizations to a whole new level of functionality.
Another great job! Thank you for sharing it!
Could I ask for the countdown/countup formulas?
I appreciate your effort on keeping us up to date with such a great content!!!
I’m trying to replace the html from the filter of a html calculated collumn as shown in your countdown/countup screenshot above but am struggling, can you help?
Good day, I am very interested in your formulas. are you looking for any more testers? if so please let me know what I need to do to sign up
Simple question: Got this to work very nice – now I want to enhance. Can someone please show example of how to turn test a color like red or green for the days remaining – such as the example at top of page.
It should say text instead of test above.
There is no post newer than this one with instructions or code. [censored].
If you want to try out this method, here is the link: