This is a migrated thread and some comments may be shown as answers.

[Solved] Format("{0:dd/MM/yyyy}") is not working as expected on Server,grid show previous day date instead of showing actual date.

1 Answer 75 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
ankit
Top achievements
Rank 1
ankit asked on 03 Jan 2011, 08:44 AM
Hi,
    I am facing strange problem when i am using .Format("{0:dd/MM/yyyy}") for one of my date time column of Grid column.
    The grid show previous day date instead of showing actual date
    i.e.
    if i had value in database 2010-12-24 00:00:00 and as i had format my DateTime column with .Format("{0:dd/MM/yyyy}"
    it should display 24-12-2010(i get this value on local machine),
    but when i upload on my production server it shows me 23-12-2010.
    This is happening for all module of my project.

    My Teleric.Web. Mvc file version is 2010.2.825.235.
    I am using Grid with editig functionality and my grideditmode is inform

    The code of my column to display date is mention below, InstallationDate is nullable DateTime in my model.
    columns.Bound(p => p.InstallationDate).Width(150).Format("{0:dd/MM/yyyy}").HtmlAttributes(new { @class = "edit" });


    It works fine on my local machine, but when i deploy on production server i am facing this strange problem.
    I had attached screenshot of edit mode and list mode of grid.

Thanks,
Ankit

1 Answer, 1 is accepted

Sort by
0
Cliff
Top achievements
Rank 1
answered on 08 Feb 2012, 07:05 AM
I have the exact same problem; however, I am running version 2011.1.315 and using Format("{0:MM/dd/yyyy}").  Somebody found a work around here, but I haven't tried it - hoping Telerik will provide a fix.  
Tags
Grid
Asked by
ankit
Top achievements
Rank 1
Answers by
Cliff
Top achievements
Rank 1
Share this question
or