anonymous Log in
Search
Recents:
v3.0
gxenglish-l
Date and DateTime not reading correctly from MySql
11/12/14 13:30

Jannie Louw

Replies: 3

I am reading a datetime attribute from mysql and get an incorrect answer The
specific code is:
For each
where FieldNo = 123
&DateTime = DateTimeAttribute
EndFor
When I display the MySql record 123, using MySql workbench, I get an answer
or 2014-12-10 22:00:00. When I read the field using the abovementioned code
I get an answer of 11/12/14 00:00
My regional settings on my Control Panel is set to dd/MM/yy, I have also set
my Kb language as English and in Genexus have set the Customization -
Localization - English's Date format to Spanish, with a 24 hour format.
I am using .net web, c# and Ev 2


Replies

ab7723

11/12/14 13:41
Jannie, it seems the 2 hours difference is because of your Timezone or TimeZone Support settings. Please read http://wiki.genexus.com/commwiki/servlet/hwiki?Toc%3ATimeZone+Support, (and http://wiki.genexus.com/commwiki/servlet/hwiki?Enabling+TimeZone+Support,, etc) Regards, Armin On Thu, Dec 11, 2014 at 11:28 AM, Jannie Louw

Jannie Louw

11/12/14 18:42
Hi Armin Thanks for the reply It seem to have solved my problem. I assume the setting in Web.Config for “StorageTimeZone� must be either 0 or 2. Nowhere could I get a description the meaning of “StorageTimeZone� or what the alternatives are in Web.config. Both seem to work or any other setting but 1. Where can I get a description?. It is not in “Application Configuration File Entries� and I couldn’t find it in Google Thanks

ab7723

11/12/14 19:04
Jannie, i would suggest making the property changes in the KB, using GeneXus. Let GeneXus write the code and the web.config too whenever possible :) Note that changing timezone settings may not affect only the web.config, but also the generated code: http://wiki.genexus.com/commwiki/servlet/hwiki?Changing+the+value+of+DateTime+Storage+property Nevertheless if you need to modify the web.config in a production environment , i suggest setting the property value you want in GeneXus, let GeneXus generate the new web.config and then merge that change into the web.config of your production environment. Regards, Armin On Thu, Dec 11, 2014 at 4:39 PM, Jannie Louw


Back to gxenglish-l