How to only show data that hasn't passed the current data?

I have some data in an xml file. I can get it to connect fine to an .html page. My question is how do I only show the data that hasn't passed the current date? Can this be done?

The following is the XML file
<?xml version="1.0" encoding="utf-8"?>
<sports>
     <item>
          <date>2010-03-21</date>
          <opponet>Essendon</opponet>
          <location>MCG</location>
          <time></time>
     </item>
     <item>
          <date>2011-01-11</date>
          <opponet>Collingwood</opponet>
          <location>Etihad</location>
          <time></time>
     </item>
     <item>
          <date>2011-03-04</date>
          <opponet>Carlton</opponet>
          <location>Princes Park</location>
          <time></time>
     </item>
     <item>
          <date>2011-03-08</date>
          <opponet>Sydney</opponet>
          <location>SCG</location>
          <time></time>
     </item>
     <item>
          <date>2011-03-21</date>
          <opponet>Brisbane</opponet>
          <location>Gabba</location>
          <time></time>
     </item>
</sports>
The following is the HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:spry="http://ns.adobe.com/spry">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script src="SpryAssets/xpath.js" type="text/javascript"></script>
<script src="SpryAssets/SpryData.js" type="text/javascript"></script>
<script type="text/javascript">
function pad(number, length) {
     var str = '' + number;
     while (str.length < length) {
          str = '0' + str;
     return str;
var dt= new Date()
var today = dt.getFullYear()
    + '-' + pad(dt.getMonth()+1,2)
    + '-' + pad(dt.getDate(),2);
var ds1 = new Spry.Data.XMLDataSet("asdf.xml", "sports/item[date > '"+today+"']", {sortOnLoad: "date", sortOrderOnLoad: "ascending", useCache: false});
alert (today);
</script>
</head>
<body>
<div spry:region="ds1">
<table>
    <tr>
      <th spry:sort="date">Date</th>
      <th spry:sort="opponet">Opponet</th>
      <th spry:sort="location">Location</th>
      <th spry:sort="time">Time</th>
    </tr>
    <tr spry:repeat="ds1" spry:odd=".atl" spry:hover=".alt">
      <td>{date}</td>
      <td>{opponet}</td>
      <td>{location}</td>
      <td>{time}</td>
    </tr>
  </table>
</div>
</body>
</html>
Gramps

Similar Messages

  • How to only show data for a certain period of time for cumulative data?

    I need to show cumulative data for the past 12 months on a chart (e.g. # of accounts). But in order to get the cumulative data for Month 1, I need to cum the data starting from the very first month when we started to add new account which can be Jan 2006. If I put a filter to limit the data to only last 12 months, then my Month 1's cum data will not include any account prior to Month 1. So how do I do this?
    Edited by: user637947 on Feb 5, 2009 2:02 PM

    Hi,
    Try this Filter....
    Opportunity."Close Date" >= TIMESTAMPADD(SQL_TSI_MONTH, -11, TIMESTAMPADD(SQL_TSI_DAY, -(DAY(CURRENT_DATE) - 1), CURRENT_DATE)) AND Opportunity."Close Date" <= TIMESTAMPADD(SQL_TSI_MONTH, 1, TIMESTAMPADD(SQL_TSI_DAY, -(DAY(CURRENT_DATE) + 0), CURRENT_DATE))
    Thanks and Regards,
    Amit Koul

  • A php search engine that only shows results that match entire serch string

    I have set up a dreamweaver search engine through php and a fulltext search (WHERE MATCH (....) AGAINST (...). However, when someone inputs more than one word into the search form, the search engine churns out results that only have one of those words. How do I get it to only show results that have all the search string words inside? (or, at least, how do I get those results to show up at the top?)
    I have seen some advice (here) that uses php code to process the search query, divide up the words, and place a BOOLEAN '+' between each of the words. By doing this, the search engine will only show results that fully match all the terms.
    My problem is that I do not know how to put this code into my Dreamweaver-created code.
    My dreamweaver created code:
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    $form_rsSearch = "-1";
    if (isset($_get['search'])) {
      $form_rsSearch = $_get['search'];
    mysql_select_db($database_dataConnect, $dataConnect);
    $query_rsSearch = sprintf("SELECT title, content FROM encyclopedia WHERE MATCH (title, content) AGAINST (%s)", GetSQLValueString($form_rsSearch, "text"));
    $rsSearch = mysql_query($query_rsSearch, $dataConnect) or die(mysql_error());
    $row_rsSearch = mysql_fetch_assoc($rsSearch);
    $totalRows_rsSearch = mysql_num_rows($rsSearch);
    $input_rsSearchResults = "-1";
    if (isset($_GET['search'])) {
      $input_rsSearchResults = $_GET['search'];
    mysql_select_db($database_EMdataConnect, $dataConnect);
    $query_rsSearchResults = sprintf("SELECT title, content FROM encyclopedia WHERE MATCH(title, content) AGAINST(%s)", GetSQLValueString($input_rsSearchResults, "text"));
    $rsSearchResults = mysql_query($query_rsSearchResults, $dataConnect) or die(mysql_error());
    $row_rsSearchResults = mysql_fetch_assoc($rsSearchResults);
    ?>
    and the code the website (link above) gives is:
    function search(String $search_string) {
         //strip Boolean search characters out of search string
         $search_string = string_replace($search_string,"+","");
         $search_string = string_replace($search_string,"-","");
         $search_string = string_replace($search_string,"*","");
         //split the search string up into an array of words
         Array $tokenized_search = split($search_string, " ");
         //init an empty final search string
         String $processed_search = "";
         //for each word in the search, wrap it
         //with an + and * character and then append
         //it to the processed_search variable
         foreach($tokenized_search as $token) {
              $processed_search+="+"+$token+"* ";
         //build the sql for the query and query the DB
         String $db_query = "select id, description
              from product_descriptions
              where MATCH(description)
              AGAINST ('"+$processed_search+"' IN BOOLEAN MODE)";
         Array results = execute_database_query($db_query);
         return results;
    If anyone can instruct me on the correct way to go about this, I would be very much obliged.
    Thank you,
    YWSW

    Don't use the Search bar, type the address in the Location bar.

  • My deleted contacts still show up when I want to send a text message. But when I go to my address book there not there only when I want to send a text MSG there name comes up and if I select them it only show there number not name in the message.  How an

    My deleted contacts still show up when I want to send a text message. But when I go to my address book there not there only when I want to send a text MSG there name comes up and if I select them it only show there number not name in the message. How an I get rid of that

    Try this...
    have a text convo with the person you want to delete. Go to the top contact in the text convo, hit edit contact, and delete that contact.
    That resolution came from another thread on this issue, and this did solve to poster's issue.

  • My mac book pro login screen background wont show and only shows a light white/blue as the background how do i fix it ?

    my mac book pro mountion lion system  login screen background wont show and only shows a light white/blue as the background how can i fix it ? i tried everything from loginox to onyx and it still wont solve the problem. instead of the default dark grey startup screen  the background is white with a blue tint to it. the only time that the default background shows is when i log off and relog in

    Welcome to the Apple Support Communities
    I think that your Mac detects your hard disk, but the problem is that your new hard disk doesn't contain any operating system, so your Mac doesn't find any bootable partition and you see a question mark.
    If your Mac came with DVDs, insert the Mac OS X Install DVD and hold the C key while your Mac is starting. Then, just install Mac OS X. If the hard disk isn't prepared to install Mac OS X, you will have to erase it using "Mac OS Extended (Journaled)". See > http://pondini.org/OSX/DU1.html

  • How do i show date and time info of videos in Iphone as they appeare before import in iPhoto?

    How do i show date and time info of videos in Iphone as they appeare before import in iPhoto? or even as they appear on the iPhone itself? The selection on tool bar for show info is greyed out.

    Welcome T G Brown to the  iMovie boards..
    the socalled timestamp is within the imports.. if you select a clip in iM and hit the key combo Apple-I, you can see recording time and date.
    unfortunately, this info isn't delivered to any software. Bruce Gee (geethree.com, excellent plug-in maker) told us, there's no 'API' he could use for such a feature...
    same on the pro side, read this discussion at the FinalCutExpress boards:
    http://discussions.apple.com/message.jspa?messageID=7982935
    Forum member Ian offers a solution with a 3rd party app ....
    so: pen&pencil and typing timestamp manually into any 'Title' seems to be your only option...

  • Filter "Other users" to only show schems that have objects

    I searched thru the forum, but didn't see this request anywhere. It would be nice to have a preference to only display "Other Users" who actually own objects in their schema.
    In TOAD, there's a preference like this under Schema Browser->Data. Their preferences are:
    * Show all users
    * Only show users that own objects
    * Only show users that own objects excluding Synonyms
    * Only show users that own objects excluding Synonyms and Temporary Tables
    This would be really useful for me, as our database has a ton of users that have no objects. :-)
    Thanks for a cool product that works on my Mac!
    --Leif                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    It is great to have this feature, but at our site it is VERY slow - so much so that I thought that SQL Developer had hung.
    I assume that when this option is selected, the query is doing something like select distinct owner from all_objects and when the option is not selected it is querying user_name from all_users?
    It takes only about a second to display our list of appoximately 1800 users (unsorted at the moment :( ) and it took 95 seconds to filter that list to the 235 users that have visible objects (we have ~ 240000 records in all_objects).
    On another point, selecting this option effectively removes an already saved filtered user if it doesn't have any available objects. This seems to include checking against schemas with availble objects when expanding the "Other Users" node, which now takes significantly longer than when this option is not set - taking 60 seconds to expand the node which is filtered to just eight schemas out of the 235 with available objects.
    Going back to the Other Users Filter to switch off this option appears to simply hang SQL Developer for the ~ 90 seconds that it takes to query the list of schemas with available objects.
    I don't know whether it is possible to do something about this sort of performance, but with the performance I am getting at the moment, I won't be using this functionality.

  • I was trying to make a new screen recording using quicktimeplay, but when I watched the video after recording it all I could hear was me talking while the video was showing on the screen. How do I turn off that recording and turn the right one on? thanks

    I was trying to make a new screen recording using quicktimeplay, but when I watched the video after recording it all I could hear was me talking while the video was showing on the screen. How do I turn off that recording and turn the right one on? thanks

    Hi j2399123,
    It sounds like your screen recording is doing what it was designed to do, capture what is happening on your screen, with optional voice over with the microphone.
    Screen recording is for recording what you see on the screen, it is not a "video capture" option, like for capturing a movie with sound that is playing on your screen.
    For the QuickTime recording options, check out "Recording with QuickTime Player" in
    Mac Basics: QuickTime Player creates, plays, edits, and shares video and audio files
    http://support.apple.com/kb/ht4024
    And for screen recording specifically, there's
    QuickTime Player 10.x: Record your computer’s screen
    http://support.apple.com/kb/PH5882
    Thank you for thinking of Apple Support Communities for your support needs.
    Nubz

  • How to only show dock when no apps are open

    I would like for a way to configure my dock so that it is only visible when my desktop is showing, and that it goes into the "automatically show and hide the dock" when applications are open on my current desktop. This would allow for a full screen experience in-app, but still have the convenience of all my apps visible when I do not have an app open on my current desktop.
    I assume a simple application or mod could be built to allow for this?

    Hi,
    Not by my knowledge or ever read or here of it this is posible ...
    Dimaxum

  • I have an old version of itunes on my computer.  My current iPhone will only support OS 10.6.8, how can I upgrade to that system instead of the latest version?

    I have an old version of itunes on my computer.  My current iPhone will only support OS 10.6.8, how can I upgrade to that system instead of the latest version?

    In teh middle of this page...
    -> http://support.apple.com/kb/DL1576
    Download iTunes 10.7 for Windows here: iTunes 10.7 for Windows

  • HT4743 I just purchased an iTunes TV show and it successfully downloaded. It is now saying that I do not have the proper version of QuickTime on this version of iTunes (10.6.3). How can a show I purchased be incompatible with the latest version of iTunes?

    I just purchased an iTunes TV show and it successfully downloaded. It is now saying that I do not have the proper version of QuickTime on this version of iTunes (10.6.3).
    How can a show I purchased be incompatible with the latest version of iTunes?
    I want a refund, but I can't even figure out how to request one through support. Super frustrated and long time Apple customer.

    After a day of trying, both iTunes and my Apple TV are telling me that the episodes of Scooby Doo I purchased are incompatible due to QuickTime. I still don't understand how I purchased something from iTunes that doesn't work with iTunes.
    the exact error I receive when I try to play an episode is the following:
    "This movie requires QuickTime, which is not supported by this version of iTunes."
    Any advice would be great!

  • When I'm on an app, on iso7.1 it will now show the "iPad/iphone" sign the time and the battery whilst running in an app. does anyone know how to get rid of that as its effecting the games i play.

    when I'm on an app, on iso7.1 it will now show the "iPad/iphone" sign - the time - and the battery whilst running in an app. does anyone know how to get rid of that as its effecting the games i play.

    If you can hide the status bar, it would be an option inside the app. I have one or two apps where that is an option but in most apps it is not.

  • HT5824 How do I delete an iCloud ID from on my iPhone 5s, The phone only shows my old apple ID, not the new one?

    How do I delete an iCloud ID from on my iPhone 5s, The phone only shows my old apple ID, not the new one?

    Go to Settings -> icloud and then you should see your icloud id, scroll to the bottom and select delete account, you are then able to add your new one.
    Hope it helps
    Lesoot

  • HT4623 My deleted contacts still show up when I want to send a text message. But when I go to my address book there not there only when I want to send a text MSG there name comes up and if I select them it only show there number not name in the message. 

    My deleted contacts still show up when I want to send a text message. But when I go to my address book there not there only when I want to send a text MSG there name comes up and if I select them it only show there number not name in the message.  How an I get rid of that

    Try this...
    have a text convo with the person you want to delete. Go to the top contact in the text convo, hit edit contact, and delete that contact.
    That resolution came from another thread on this issue, and this did solve to poster's issue.

  • HT1209 I've successfully imported the videos I've shot with my iphone5 into iphoto on my MacBookPro but they're only showing up as still shots, ie the imported videos don't play! Itunes no longer opens automatically when syncing!

    I've successfully imported the videos I've shot with my iphone5 into iphoto on my MacBookPro but they're only showing up as still shots, ie the imported videos don't play! Itunes no longer opens automatically when syncing, and when I open itunes it shows that there are zero "home movies" in there, meaning that it never grabbed the videos from my phone either. What to do? Thanks!

    tl:dr?
    Really?
    There was a short version expressly for people who weren't bothered to read a myriad of text.
    Meh, not that it matters anymore. I ended up redownloading 70-odd albums, so I have the bulk of my music back. And I still have no idea what iTunes did with my files, but I'll make sure it never does it again.
    I would thank you for the help but you were utterly useless. Oh well, carry on.

Maybe you are looking for