Hey Guys,

I have a Data Grid View which displays a few things from the database, one of the information being displayed is the Date,The date is set in Clarion and i want to change it so it gets changed to the date we see it as today.

I have a formula which can convert the to clarion date to todays date, but how do i display it in the grid view for all the rows.

Now todays date is 16/5/2011 (UK FORMAT)

Clarion Date is 01/01/1900

Clarion Days to this date is : 36161

To Calculate to clarion the formula is : 16/5/2011 - 01/01/1900 = 40678

40678 + 36161 = 76839

Now the result shown above is the format my GridView is being populated, so i want to change the numbers from 76839 to date format which will be todays date.

Can anyone help? as GridView will have many different Clarion Dates the formula will need applying to, but the main thing is to make sure one attribute in a gridview can be displayed differently.

Can someone please help thanks :)

6 Years
Discussion Span
Last Post by YMCMb

I have solved this problem as the clarion date is in number of days from 1/1/1900, i did a private function as follows:

Dim mydate As Date = "1/1/1900"
dim myDoodle as double = "76543"
        Dim MyAnswer As Date
        hfClarionNo.Value = "36161"

        lblMyDate.Text = (MyDodo - hfClarionNo.Value) - 2
        hfmyclarion.Value = MyDoodle

        MyAnswer = mydate.AddDays(lblMyDate.Text)
        Label2.Text = MyAnswer

put the above code in a loop and problem solved :D

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.