We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Wrong Date in Baseline End and Start after calling PageMethode

Dear All

If I add a new record to the Gantt Control which includes a Baseline Start and End Date the Dates are wronly transported.

example:

BEnd = 13.06.2017
BStart = 26.06.2017

after PageMethode the transfered data will then look like

BEnd = 12.06.2017
BStart= 25.06.2017

I have prepared a Video which shows it as well.

any suggestions?

Thamks
Martin

Attachment: error_BaseLine_Start_End_35a75854.zip

3 Replies

JD Jayakumar Duraisamy Syncfusion Team August 7, 2017 10:44 AM UTC

Hi Martin, 
We have analyzed the reported issue and it is due to time zone offset problem. When stringify the UTC date format, it is convert with time zone offset variation. Hence, we get basline date value has one date difference. To overcome this problem, we have to pass the baseline date values to Convert.ToDateTime() method and it will be convert back as original date value.  
Please refer following code snippet, 
public string GetOriginalDate(string date) 
        { 
            DateTime convertedDate = Convert.ToDateTime(date); 
 
            return (convertedDate.Month + "/" + convertedDate.Day + "/" + convertedDate.Year); 
        } 
We have prepared a sample for your reference. In the server side, we have a method called “GetOriginalDate”. It will return original date in string format and add it to the database. 
Please find the sample location as below, 
To know more about time zone offset,  
Please let us know, if you require any other assistance. 
Regards, 
Jayakumar D 
  
  



MS Martin Sickel August 8, 2017 07:37 AM UTC

Thank you



JD Jayakumar Duraisamy Syncfusion Team August 9, 2017 07:17 AM UTC

Hi Martin, 
We are happy that your issue has been resolved. Please let us know if you need any other assistance. 
Regards, 
Jayakumar D 


Loader.
Live Chat Icon For mobile
Up arrow icon