StrataFrame Forum

Datetime issue

http://forum.strataframe.net/Topic32429.aspx

By Danny Doobay - 2/13/2014

Hello,

I am using strataframe datebox control and BO in a maintenance form. The datebox is bound to BO and datetime field of it.

when I enter March 26, 2002 in the datebox and saved, it is save as March 26, 2002 in the database.

When close the form and go back to the same record datebox showing March 25, 2002. I debug the form and looked at the BO value for the datetime field it shows March 25, 2002  11:00 pm.

My time zone in the saver and the client are (UTC -05:00) EST.

What is going wrong and how can I fixed it?
By Edhy Rijo - 2/13/2014

Hi Danny,

This message should have been posted in another forum like (WinForm - How to) http://forum.strataframe.net/Forum7.aspx

Now, back to your message, it is very weird, so couple of questions:
  1. What database engine are you using?
  2. What type of field, DateTime or Date?, based on your message it looks like DateTime, if you don't need the time part then change the field type to Date.
By Danny Doobay - 2/13/2014

I am using SQL server 2012 enterprise and datetime field. As you mentioned, I changed the field to date and still same result.
By Danny Doobay - 2/13/2014

It started to look very strange, only the dates in march got displayed as one day earlier:

1943-03-16 
1994-03-25 
1997-03-26 
1998-03-25 
1965-03-31 
1958-03-18 
1972-03-09 
1996-03-28 
2002-03-25 
1997-03-18 
2003-03-27 
2001-03-09 
1966-03-30 
1989-03-21 
2000-03-29 

but 2007-03-21 was fine.
By Edhy Rijo - 2/13/2014

I use the DateBox all over my applications and have never noticed anything wrong specially reading the date wrongly, it must be something wrong with your database or the form.