I’m reading in info from a database and I’m really just having a problem with how it is displayed/sorted. I want to read in a datetime but I only want to display the date and I want it sorted from now to future.
nextreview.DataType = System.Type.GetType("System.DateTime");
This is what I have now but this includes the time but I dont need it and want it gone.
Had this before:
nextreview.DataType = System.Type.GetType("System.String");
and when reading it in…converting the string to display like I wanted
ToString("MM/dd/yyyy")
which was perfect except when it came to sorting.
So any help on how to get it to display as “mm/dd/yyyy” but still be treated like a datetime? using c# and asp.net for webpage
Here is the code for those that were interested http://pastebin.com/WQBUyrQT
I just redid the page and built the table in gridview rather than building it in the code…in the end it was just much easier..had to change a bit of the code…but it all turned out good..thanks for all the input