I am using an excellent template from this website to export to XML.
Can anyone confirm if it is possible to export the "Date Added" field out in the following format YYYY/MM/DD
When, for example sorting on that column it will sort it on the DD, then on the MM, then on the YYYY.
Thanks everyone.
AJW
Export XML file using date in format YYYY/MM/DD
-
- Posts: 76
- Joined: 2008-02-22 21:50:31
-
- Posts: 76
- Joined: 2008-02-22 21:50:31
That is not the result of the xml when I use it....
I opened up the XML with notepad.exe to view and the output definately was dd/mm/yyy It is in the html mask that is used to generate the xml file... shown below (without ===header/footer)???
===============================================
<html xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="content-style-type" content="text/css">
<meta http-equiv="content-script-type" content="text/javascript">
<title>Movie list of $$OWNER_NAME</title>
<!-- Default layout setting -->
<script>
var layout="layout1.xml";
</script>
<!-- Style sheets -->
<link title="Cyan" rel="alternate stylesheet" type="text/css" href="themes/cyan.css">
<link title="Blue" rel="alternate stylesheet" type="text/css" href="themes/blue.css">
<link title="Black" rel="stylesheet" type="text/css" href="themes/black.css">
<link title="Orange" rel="alternate stylesheet" type="text/css" href="themes/orange.css">
<!-- External javascript source file -->
<script language="JavaScript" src="movies.js"></script>
</head>
<body onload="loadXML();">
<!-- Header row buttons -->
<div class="boxbordercontent"><div class="boxcontent">
<center>
<a href="javascript:dToggle('oFind',-1)"><img src="images/picBlank.gif" class="picSearch" width="160" height="37" title="Search" hspace="3"></a>
<a href="javascript:dToggle('oJump',-1)"><img src="images/picBlank.gif" class="picJump" width="160" height="37" title="Goto" hspace="3"></a>
<a href="javascript:dToggle('oOptions',-1)"><img src="images/picBlank.gif" class="picOptions" width="160" height="37" title="Settings" hspace="3"></a>
<a href="javascript:dToggle('oInfo',-1)"><img src="images/picBlank.gif" class="picInfo" width="160" height="37" title="Information" hspace="3"></a>
<a href="javascript:dToggle('oAbout',-1)"><img src="images/picBlank.gif" class="picAbout" width="160" height="37" title="About" hspace="3"></a>
</center>
</div></div>
<script>
<!-- Waiting Picture/Message In here
document.write("<center><table id='wait' class='boxborder' border='0' cellspacing='0' cellpadding='5'>");
document.write("<br><tr><td class='bodycontent'>Loading movie database, please wait...</td></tr>");
document.write("</table></center>");
-->
</script>
<table id="oMenu" class="clear" cellspacing="0" style="display:none">
<td class="clear">
<table id="oFind" class="boxbordercontent" cellspacing="0" style="display:none">
<tr><td class="bodycontent" nowrap colspan="2">
<div class="boxbordercontent">
<div class="boxcontent">
<a href="javascript:dToggle('oFind',-1)"><img src="images/picBlank.gif" class="picSearch" width="160" height="37"></a>
<b>Search</b>
</div>
</div>
</td></tr>
<tr><td class="bodycontent" nowrap>
<input type="text" id="oFindText">
<input type="button" value="search" onclick="javascript:search(document.getElementById('oFindText').value);">
</td></tr>
</table>
</td>
<td class="clear">
<table id="oJump" class="boxbordercontent" cellspacing="0" style="display:none">
<tr><td class="bodycontent" nowrap colspan="2">
<div class="boxbordercontent">
<div class="boxcontent">
<a href="javascript:dToggle('oJump',-1)"><img src="images/picBlank.gif" class="picJump" width="160" height="37"></a>
<b>Goto</b>
</div>
</div>
</td></tr>
<tr><td class="bodycontent" nowrap>
<input type="text" id="oJumpTo" size="4" maxlength="4">
<input type="button" value="goto" onclick="javascript:jump(document.getElementById('oJumpTo').value);">
<input type="button" value=" < " onclick="javascript:pageUp(document.getElementById('oJumpTo').value);">
<input type="button" value=" > " onclick="javascript:pageDown(document.getElementById('oJumpTo').value);">
</td></tr>
</table>
</td>
<td class="clear">
<table id="oOptions" class="boxbordercontent" cellspacing="0" style="display:none">
<tr><td class="bodycontent" nowrap colspan="2">
<div class="boxbordercontent">
<div class="boxcontent">
<a href="javascript:dToggle('oOptions',-1)"><img src="images/picBlank.gif" class="picOptions" width="160" height="37"></a>
<b>Settings</b>
</div>
</div>
</td></tr>
<tr>
<td class="bodycontent">Titles per page</td>
<td class="bodycontent" nowrap>
<input type="text" id="pagesize" maxlength="3" size="5">
<input type="button" value=" OK " onclick="javascript:setPagesize();showPage();">
</td></tr>
<tr>
<td class="bodycontent" id="oOptionsCategories" valign="top"></td>
<td class="bodycontent" id="oOptionsLayouts" valign="top"></td>
</tr>
</table>
</td>
<td class="clear">
<table id="oInfo" class="boxbordercontent" cellspacing="0" style="display:none">
<tr><td class="bodycontent" nowrap colspan="2">
<div class="boxbordercontent">
<div class="boxcontent">
<a href="javascript:dToggle('oInfo',-1)"><img src="images/picBlank.gif" class="picInfo" width="160" height="37"></a>
<b>Information</b>
</div>
</div>
</td></tr>
<tr><td class="bodycontent" nowrap colspan="2">
Movie list of $$OWNER_NAME<br>
Last update on $$DATE<br>
Total $$TOTALMOVIES titles in database
</td></tr>
</table>
</td>
<td class="clear">
<table id="oAbout" class="boxbordercontent" cellspacing="0" style="display:none">
<tr><td class="bodycontent" nowrap colspan="2">
<div class="boxbordercontent">
<div class="boxcontent">
<a href="javascript:dToggle('oAbout',-1)"><img src="images/picBlank.gif" class="picAbout" width="160" height="37"></a>
<b>About</b>
</div>
</div>
</td></tr>
<tr>
<td class="bodycontent" nowrap>
<img src="images/antmovie.gif" width="38" height="38"><br>
</td>
<td class="bodycontent" nowrap>
<a href="http://www.antp.be/software/moviecatalog/" target="_blank">
Created with Ant Movie Catalog</a><br>
Based on template by KC And A<br>
2008 ©
</td>
</tr>
</table>
</td>
</tr>
</table><br>
<table id="oMovieTable" class="boxbordercontent" cellspacing="0" style="display:none" width="100%">
<tbody id="oHeaders"></tbody>
<tbody id="oCategories"></tbody>
<tbody id="oMovieList"></tbody>
</table>
<table id="oPageControl" class="clear" cellspacing="0" style="display:none" width="100%">
<tbody id="oPages">
<tr>
<td class="bodycontent" width="4%">
<div class="boxbordercontent">
<div class="boxcontent" id="oPagesFirst"></div>
</div>
</td>
<td class="bodycontent" width="4%">
<div class="boxbordercontent">
<div class="boxcontent" id="oPagesBack"></div>
</div>
</td>
<td class="bodycontent" width="4%">
<div class="boxbordercontent">
<div class="boxcontent" id="oPagesNext"></div>
</div>
</td>
<td class="bodycontent" width="4%">
<div class="boxbordercontent">
<div class="boxcontent" id="oPagesLast"></div>
</div>
</td>
<td class="bodycontent">
<div class="boxbordercontent">
<div class="boxcontent" id="oPagesInfo"></div>
</div>
</td>
</tbody>
</table>
<!-- Floating windows -->
<div id="oPopup" class="popup"></div>
<div id="oTip" class="tooltip"></div>
</body>
</html>
===============================================
I opened up the XML with notepad.exe to view and the output definately was dd/mm/yyy It is in the html mask that is used to generate the xml file... shown below (without ===header/footer)???
===============================================
<html xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<meta http-equiv="content-style-type" content="text/css">
<meta http-equiv="content-script-type" content="text/javascript">
<title>Movie list of $$OWNER_NAME</title>
<!-- Default layout setting -->
<script>
var layout="layout1.xml";
</script>
<!-- Style sheets -->
<link title="Cyan" rel="alternate stylesheet" type="text/css" href="themes/cyan.css">
<link title="Blue" rel="alternate stylesheet" type="text/css" href="themes/blue.css">
<link title="Black" rel="stylesheet" type="text/css" href="themes/black.css">
<link title="Orange" rel="alternate stylesheet" type="text/css" href="themes/orange.css">
<!-- External javascript source file -->
<script language="JavaScript" src="movies.js"></script>
</head>
<body onload="loadXML();">
<!-- Header row buttons -->
<div class="boxbordercontent"><div class="boxcontent">
<center>
<a href="javascript:dToggle('oFind',-1)"><img src="images/picBlank.gif" class="picSearch" width="160" height="37" title="Search" hspace="3"></a>
<a href="javascript:dToggle('oJump',-1)"><img src="images/picBlank.gif" class="picJump" width="160" height="37" title="Goto" hspace="3"></a>
<a href="javascript:dToggle('oOptions',-1)"><img src="images/picBlank.gif" class="picOptions" width="160" height="37" title="Settings" hspace="3"></a>
<a href="javascript:dToggle('oInfo',-1)"><img src="images/picBlank.gif" class="picInfo" width="160" height="37" title="Information" hspace="3"></a>
<a href="javascript:dToggle('oAbout',-1)"><img src="images/picBlank.gif" class="picAbout" width="160" height="37" title="About" hspace="3"></a>
</center>
</div></div>
<script>
<!-- Waiting Picture/Message In here
document.write("<center><table id='wait' class='boxborder' border='0' cellspacing='0' cellpadding='5'>");
document.write("<br><tr><td class='bodycontent'>Loading movie database, please wait...</td></tr>");
document.write("</table></center>");
-->
</script>
<table id="oMenu" class="clear" cellspacing="0" style="display:none">
<td class="clear">
<table id="oFind" class="boxbordercontent" cellspacing="0" style="display:none">
<tr><td class="bodycontent" nowrap colspan="2">
<div class="boxbordercontent">
<div class="boxcontent">
<a href="javascript:dToggle('oFind',-1)"><img src="images/picBlank.gif" class="picSearch" width="160" height="37"></a>
<b>Search</b>
</div>
</div>
</td></tr>
<tr><td class="bodycontent" nowrap>
<input type="text" id="oFindText">
<input type="button" value="search" onclick="javascript:search(document.getElementById('oFindText').value);">
</td></tr>
</table>
</td>
<td class="clear">
<table id="oJump" class="boxbordercontent" cellspacing="0" style="display:none">
<tr><td class="bodycontent" nowrap colspan="2">
<div class="boxbordercontent">
<div class="boxcontent">
<a href="javascript:dToggle('oJump',-1)"><img src="images/picBlank.gif" class="picJump" width="160" height="37"></a>
<b>Goto</b>
</div>
</div>
</td></tr>
<tr><td class="bodycontent" nowrap>
<input type="text" id="oJumpTo" size="4" maxlength="4">
<input type="button" value="goto" onclick="javascript:jump(document.getElementById('oJumpTo').value);">
<input type="button" value=" < " onclick="javascript:pageUp(document.getElementById('oJumpTo').value);">
<input type="button" value=" > " onclick="javascript:pageDown(document.getElementById('oJumpTo').value);">
</td></tr>
</table>
</td>
<td class="clear">
<table id="oOptions" class="boxbordercontent" cellspacing="0" style="display:none">
<tr><td class="bodycontent" nowrap colspan="2">
<div class="boxbordercontent">
<div class="boxcontent">
<a href="javascript:dToggle('oOptions',-1)"><img src="images/picBlank.gif" class="picOptions" width="160" height="37"></a>
<b>Settings</b>
</div>
</div>
</td></tr>
<tr>
<td class="bodycontent">Titles per page</td>
<td class="bodycontent" nowrap>
<input type="text" id="pagesize" maxlength="3" size="5">
<input type="button" value=" OK " onclick="javascript:setPagesize();showPage();">
</td></tr>
<tr>
<td class="bodycontent" id="oOptionsCategories" valign="top"></td>
<td class="bodycontent" id="oOptionsLayouts" valign="top"></td>
</tr>
</table>
</td>
<td class="clear">
<table id="oInfo" class="boxbordercontent" cellspacing="0" style="display:none">
<tr><td class="bodycontent" nowrap colspan="2">
<div class="boxbordercontent">
<div class="boxcontent">
<a href="javascript:dToggle('oInfo',-1)"><img src="images/picBlank.gif" class="picInfo" width="160" height="37"></a>
<b>Information</b>
</div>
</div>
</td></tr>
<tr><td class="bodycontent" nowrap colspan="2">
Movie list of $$OWNER_NAME<br>
Last update on $$DATE<br>
Total $$TOTALMOVIES titles in database
</td></tr>
</table>
</td>
<td class="clear">
<table id="oAbout" class="boxbordercontent" cellspacing="0" style="display:none">
<tr><td class="bodycontent" nowrap colspan="2">
<div class="boxbordercontent">
<div class="boxcontent">
<a href="javascript:dToggle('oAbout',-1)"><img src="images/picBlank.gif" class="picAbout" width="160" height="37"></a>
<b>About</b>
</div>
</div>
</td></tr>
<tr>
<td class="bodycontent" nowrap>
<img src="images/antmovie.gif" width="38" height="38"><br>
</td>
<td class="bodycontent" nowrap>
<a href="http://www.antp.be/software/moviecatalog/" target="_blank">
Created with Ant Movie Catalog</a><br>
Based on template by KC And A<br>
2008 ©
</td>
</tr>
</table>
</td>
</tr>
</table><br>
<table id="oMovieTable" class="boxbordercontent" cellspacing="0" style="display:none" width="100%">
<tbody id="oHeaders"></tbody>
<tbody id="oCategories"></tbody>
<tbody id="oMovieList"></tbody>
</table>
<table id="oPageControl" class="clear" cellspacing="0" style="display:none" width="100%">
<tbody id="oPages">
<tr>
<td class="bodycontent" width="4%">
<div class="boxbordercontent">
<div class="boxcontent" id="oPagesFirst"></div>
</div>
</td>
<td class="bodycontent" width="4%">
<div class="boxbordercontent">
<div class="boxcontent" id="oPagesBack"></div>
</div>
</td>
<td class="bodycontent" width="4%">
<div class="boxbordercontent">
<div class="boxcontent" id="oPagesNext"></div>
</div>
</td>
<td class="bodycontent" width="4%">
<div class="boxbordercontent">
<div class="boxcontent" id="oPagesLast"></div>
</div>
</td>
<td class="bodycontent">
<div class="boxbordercontent">
<div class="boxcontent" id="oPagesInfo"></div>
</div>
</td>
</tbody>
</table>
<!-- Floating windows -->
<div id="oPopup" class="popup"></div>
<div id="oTip" class="tooltip"></div>
</body>
</html>
===============================================
-
- Posts: 76
- Joined: 2008-02-22 21:50:31
The javascript translates the system date format to an internal format of yyyymmdd. You need to comment out the correct date format of your PC in the source file "movies.js" otherwise sorting on date will not work properly (default setting is the european format of dd-mm-yyyy).ajwconsult wrote:Yes,
By going into regional settings in control panel and change short date to yyyy/mm/dd the output of the xml does in fact output from the windows regional settings.
Thanks for your help...
I am referring here to the updated version 1.0 of this script.
BonieNL