<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : Sorting dates</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Report Control : Sorting dates]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Fri, 15 May 2026 00:49:20 +0000</pubDate>
  <lastBuildDate>Tue, 21 Sep 2010 08:35:05 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=17215</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[Sorting dates :  Thanks for your interest Aaron....]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17215&amp;PID=60369&amp;title=sorting-dates#60369</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6039">CapoPezzio</a><br /><strong>Subject:</strong> 17215<br /><strong>Posted:</strong> 21 September 2010 at 8:35am<br /><br />Thanks for your interest Aaron. But I think I found my problem. There were some old code wich "converted" my sql, my date-columns where converted in the sql-statement... select col1,col2 ,convert(varchar(24),col3,104) from.... <br><br>..wich resultet in my recordset(and ReportControl) treated my date-column as text, and therefore sorted it as text.<br>Removed the old code in the sql-statement and did the formating in RC_BeforeDrawRow. It did wonder.<br><br>Private Sub RC_BeforeDrawRow(ByVal Row As XtremeReportControl.IReportRow, ByVal item As XtremeReportControl.IReportRecordItem, ByVal Metrics As XtremeReportControl.IReportRecordItemMetrics)<br>&nbsp;&nbsp; if item.index = index_of_datecol<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; item.format = "%d.%m.%Y"<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Metrics.Text = item.Caption<br>&nbsp;&nbsp;&nbsp; end if<br>&nbsp;<br>End Sub<br><br>did this because my date-columns contains date and time and I only wanted to show date<br>]]>
   </description>
   <pubDate>Tue, 21 Sep 2010 08:35:05 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17215&amp;PID=60369&amp;title=sorting-dates#60369</guid>
  </item> 
  <item>
   <title><![CDATA[Sorting dates : Hi,  I tried with CJ sample...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17215&amp;PID=60349&amp;title=sorting-dates#60349</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 17215<br /><strong>Posted:</strong> 21 September 2010 at 5:57am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>I tried with CJ sample and it actually sorts date/time values...</DIV><DIV>&nbsp;</DIV><DIV>Can you upload small test project?</DIV><DIV>&nbsp;</DIV><DIV>Thanks</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Tue, 21 Sep 2010 05:57:59 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17215&amp;PID=60349&amp;title=sorting-dates#60349</guid>
  </item> 
  <item>
   <title><![CDATA[Sorting dates : Hi. I dont find a way to set the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17215&amp;PID=60347&amp;title=sorting-dates#60347</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6039">CapoPezzio</a><br /><strong>Subject:</strong> 17215<br /><strong>Posted:</strong> 21 September 2010 at 5:20am<br /><br />Hi. I dont find a way to set the types of my columns when I use Databind. Anyone know if there is a way to set the type (ie Date) on all the data in a Column when I use Databind, so my sorting will work. Now I have to go through every dateitems in every rows and set the format manually. I have 3 date-columns and when I have 200000 records in my grid it takes 10 seconds(wich in my world is ages<img src="http://forum.codejock.com/smileys/smiley1.gif" border="0" alt="Smile" title="Smile" />), just to set the dates right so the sorting will work.]]>
   </description>
   <pubDate>Tue, 21 Sep 2010 05:20:34 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17215&amp;PID=60347&amp;title=sorting-dates#60347</guid>
  </item> 
  <item>
   <title><![CDATA[Sorting dates : Hi,  If I add an item as Date...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17215&amp;PID=60162&amp;title=sorting-dates#60162</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3701">Aaron</a><br /><strong>Subject:</strong> 17215<br /><strong>Posted:</strong> 13 September 2010 at 9:59am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>If I add an item as Date it will sorted as date so (don't know for sure...)&nbsp;I don't think DataBind feature supports types yet ???? </DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Mon, 13 Sep 2010 09:59:25 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17215&amp;PID=60162&amp;title=sorting-dates#60162</guid>
  </item> 
  <item>
   <title><![CDATA[Sorting dates : I am using Reportcontrol and give...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=17215&amp;PID=60080&amp;title=sorting-dates#60080</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6039">CapoPezzio</a><br /><strong>Subject:</strong> 17215<br /><strong>Posted:</strong> 07 September 2010 at 7:30am<br /><br />I am using Reportcontrol and give it a recordset and uses databind.<br><br>My database have dateformat dd.mm.yyyy and I want to show it that way. That works fine, but when I sort on a date-column it is not correct.<br><br>it shows<br><br>01.01.2007<br>01.01.2008<br>02.01.2007<br>02.03.2008<br>02.04.2007<br><br><br>My workaround at the moment is afters Databind I go through every dateitem in the Reportcontrol and set the caption-property to show dd.mm.yyyy format an set the value-property to yyyymmdd-format. This way it shows correct and it sorts correct. But I thought this was going to work with no workaround. Any idea?<br><br>]]>
   </description>
   <pubDate>Tue, 07 Sep 2010 07:30:00 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=17215&amp;PID=60080&amp;title=sorting-dates#60080</guid>
  </item> 
 </channel>
</rss>