472,144 Members | 1,940 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,144 software developers and data experts.

ASP-created spreadsheet date problems

This could be an Excel thing, but I am not ruling out my ASP code.

Using ASP 3.0, I give the user the ability to create a spreadsheet with a
click. In the resulting spreadsheet, I have 2 columns which contain dates,
and which were created by almost exactly the same code, yet they behave
differently when I try to sort.

First, go to http://www.middletree.net/get.htm and right-click and save the
Excel file, then open it.

Note that the dates in both the Open Date and the Last Modified column look
pretty similar. Now, move the cursor so that you aren't accidentally
highlighting an entire column or anything. From the Excel menu, select Data,
then Sort. In the box that comes up, tell it that you want to sort by TSE,
then by Last Modified.

When you do this, you'll see that the TSE part is correct. However, the
LastModified date is out of order. Specifically, there are some 2005 dates
surrounded by 2006 dates.

Interestingly, this problem doesn't seem to occur in the Open Date column. I
have spent a lot of time looking at my ASP code, but I don't see how these
two columns were built any differently.

Ar any rate, how can I make this so that the dates are sorted correctly?

Aug 15 '06 #1
2 1247
Middletree wrote:
This could be an Excel thing, but I am not ruling out my ASP code.

Using ASP 3.0, I give the user the ability to create a spreadsheet
with a click. In the resulting spreadsheet, I have 2 columns which
contain dates, and which were created by almost exactly the same
code, yet they behave differently when I try to sort.

First, go to http://www.middletree.net/get.htm and right-click and
save the Excel file, then open it.

Note that the dates in both the Open Date and the Last Modified
column look pretty similar. Now, move the cursor so that you aren't
accidentally highlighting an entire column or anything. From the
Excel menu, select Data, then Sort. In the box that comes up, tell it
that you want to sort by TSE, then by Last Modified.

When you do this, you'll see that the TSE part is correct. However,
the LastModified date is out of order. Specifically, there are some
2005 dates surrounded by 2006 dates.

Interestingly, this problem doesn't seem to occur in the Open Date
column. I have spent a lot of time looking at my ASP code, but I
don't see how these two columns were built any differently.

Ar any rate, how can I make this so that the dates are sorted
correctly?
I hate to have to bust your chops on this one again, but you still have
  in that column (you do not have it in your other date column). Your
dates are being sorted alphabetically for each TSE.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms.
Aug 16 '06 #2
AAAGHHHHHHHHHHHHHHHHHHH!!!!!!!!!!!
Can't believe I spent hours on this, and that was the problem.

Sigh.

Anyway, thanks. You saved me countless more hours.
>
I hate to have to bust your chops on this one again, but you still have
  in that column (you do not have it in your other date column). Your
dates are being sorted alphabetically for each TSE.

Aug 16 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Juan T. Llibre | last post: by
6 posts views Thread by Juan T. Llibre | last post: by
7 posts views Thread by abcd | last post: by
6 posts views Thread by Chaprasi | last post: by
9 posts views Thread by Nathan Sokalski | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.