Jump to content

Build Theme!
  • Infected?


Hey there! :wub: Looks like you're enjoying the discussion, but you're not signed up for an account. When you create an account, we remember exactly what you've read, so you always come right back where you left off. You also get notifications, here and via email, whenever new posts are made. You can like posts to share the love. :D Join 92767 other members! Anybody can ask, anybody can answer. Consistently helpful members may be invited to become staff. Here's how it works. Virus cleanup? Start here -> Malware Removal Forum.

Try What the Tech -- It's free!


Deleting expired dates

  • Please log in to reply
2 replies to this topic

#1 paieye


    Authentic Member

  • Authentic Member
  • PipPip
  • 24 posts

Posted 25 July 2008 - 12:16 AM

I need a list of 'Coming Events' in date-order for a web-site, so have created one in Excel, and saved the result as an 'xml'-file. So far, so good. However, ideally the list would automatically delete events occurring on a date earlier than the current date. Is it possible to configure the list to produce that result ? .


Register to Remove

#2 david horton

david horton

    New Member

  • New Member
  • Pip
  • 4 posts

Posted 17 February 2009 - 04:57 PM

as the file is a text file using a bit of code find todays date. then any text line date < todays date do not display or delete the number of lines till the next text line date <html> <body> <script type="text/javascript"> document.write(Date()); </script> </body> </html> ---------------------------------------------------------------------- Date() --------------------------------------------------------------- And in the following example we set a Date object to be 7 days into the future: var myDate=new Date(); myDate.setDate(myDate.getDate()+7); --------------------------------------------display time---------------------------------------------------------- <html> <head> <script type="text/javascript"> function startTime() { var today=new Date(); var h=today.getHours(); var m=today.getMinutes(); var s=today.getSeconds(); // add a zero in front of numbers<10 m=checkTime(m); s=checkTime(s); document.getElementById('txt').innerHTML=h+":"+m+":"+s; t=setTimeout('startTime()',500); } function checkTime(i) { if (i<10) { i="0" + i; } return i; } </script> </head> <body onload="startTime()"> <div id="txt"></div> </body> </html> --------------------------------------------------------------------------------------------------------------------------------------------------- convert date() to a string or convert text date to a date then compare hope this helps david
I am in the U.K.

#3 Doug


    Retired Administrator -Tech Team

  • Tech Team
  • 10,057 posts

Posted 21 February 2009 - 02:50 PM

David Horton, I'm pleased to see posting and assistance of the quality that you offer. Thanks for deciding to join up. Doug
The help you receive here is free.
If you wish, you may Donate to help keep us online.

Related Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users