What the Tech logo

What the Tech? It's as easy as 1,2,3! ( Log In | Register )
Easy as 1,2,3!

Reply to this topicStart new topic
> Deleting expired dates
paieye
post Jul 25 2008, 12:16 AM
Post #1


Authentic Member
**

Group: Authentic Member
Posts: 24
Joined: 5-June 08
Member No.: 79,482
Operating System: OSX 10



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 ?

.
Go to the top of the page
 
+Quote Post
 
Start new topic
Replies (1 - 2)
david horton
post Feb 17 2009, 04:57 PM
Post #2


New Member
*

Group: New Member
Posts: 4
Joined: 17-February 09
Member No.: 84,241
Operating System: vista



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
Go to the top of the page
 
+Quote Post
Doug
post Feb 21 2009, 02:50 PM
Post #3


Tech Team
Group Icon

Group: Administrator
Posts: 6,248
Joined: 15-May 05
From: California
Member No.: 32,477
Operating System: Win98, Win2k Pro, XP Pro, XP Home



David Horton,

I'm pleased to see posting and assistance of the quality that you offer.

Thanks for deciding to join up.
Doug
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 


RSS Time is now: 21st November 2009 - 01:56 PM
Advertisements do not imply our endorsement of that product or service. The forum is run by volunteers who donate their time and expertise. We make every attempt to ensure that the help and advice posted is accurate and will not cause harm to your computer. However, we do not guarantee that they are accurate and they are to be used at your own risk.
Member site: Alliance of Security Analysis Professionals | UNITE Against Malware
Memory Forums | Auto Repair Forum
© Geeks to Go, Inc. | All Rights Reserved | Privacy Policy