Sort Datetime

I'm using web application. I have this code to sort data in a datagrid. The data comes from sql 2000 database.

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        If IsPostBack Then
            Ds1 = CType(Session("Ds"), ds)
            Session("ds") = Ds1
            dg.DataSource = Ds1.mytable.DefaultView
            dg.DataMember = ""
        End If
    End Sub

    Private Sub dg_SortCommand(ByVal source As Object, ByVal e As System.Web.UI.WebControls.DataGridSortCommandEventArgs) Handles dg.SortCommand
        dg.DataSource = Dsschedview1.schedule.DefaultView
        Ds1.schedule.DefaultView.Sort = e.SortExpression
    End Sub

This Works for all my columns except it will not sort my datetime column.
Any idea why?
LVL 12
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

what does the e equal when you are sorting by datetime?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Donnie4572Author Commented:
Thanks for reply. I have corrected this. The Dataadapter had a sort for my date column.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.