Datetime issue


Author
Message
Danny Doobay
Danny Doobay
StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)
Group: StrataFrame Users
Posts: 40, Visits: 333
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?
Edhy Rijo
E
StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
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.


Edhy Rijo

Danny Doobay
Danny Doobay
StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)
Group: StrataFrame Users
Posts: 40, Visits: 333
I am using SQL server 2012 enterprise and datetime field. As you mentioned, I changed the field to date and still same result.
Danny Doobay
Danny Doobay
StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)StrataFrame User (188 reputation)
Group: StrataFrame Users
Posts: 40, Visits: 333
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.
Edhy Rijo
E
StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)StrataFrame VIP (6K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
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.

Edhy Rijo

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search