Date format settings trouble

Posted By Supermac Thu 16 Jul 2015
Add to Favorites0
Author Message
Supermac
 Posted Thu 16 Jul 2015
Supreme Being

Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)

Group: Forum Members
Last Active: Wed 22 Jul 2020
Posts: 153, Visits: 874
I wish you're not beginning hate me but due (I think) to a date format setting maybe I changed somewhere in configuration, now Miscellaneous/Coupon page creates coupons (I can see them in db) then prompt me to coupon's list page where it shows me coupons grouped by date: when I try to see coupons details of a date clicking it, nothing happens...

Using Firebug I seen that the following error is sent to the page:
System.InvalidCastException: Conversion from string "15 lug 15" to type 'Date' is not valid.
in Microsoft.VisualBasic.CompilerServices.Conversions.ToDate(Object Value)
in ASP.usercontrols_back__coupons_ascx.__DataBinding__control30(Object sender, EventArgs e)

So I checked \UserControls\Back\_coupon.ascx file and I found that the trouble is in this code row:
<asp:Literal ID="litStartDate" runat="server" Text='<%# CkartrisDisplayFunctions.FormatDate(Eval("StartDate"), "d", Session("_LANG")) %>' />

Effectively Eval("StartDate") contains "15 Lug 15"....

May you help me to find why and how to fix it?
thank you
Fri 17 Jul 2015 by Supermac
metalmania
 Posted Thu 16 Jul 2015
Supreme Being

Supreme Being - (26,476 reputation)Supreme Being - (26,476 reputation)Supreme Being - (26,476 reputation)Supreme Being - (26,476 reputation)Supreme Being - (26,476 reputation)Supreme Being - (26,476 reputation)Supreme Being - (26,476 reputation)Supreme Being - (26,476 reputation)Supreme Being - (26,476 reputation)

Group: Forum Members
Last Active: Tue 21 Jun 2016
Posts: 36, Visits: 165
What date formats do you have setup for your language? Regional Setup -> Lang. & Email Setup
I assume your language is set to Italian..
Should probably be something like the (default) - following..
Date Format : d MMM yy
Date & Time Format : d MMM yy, HH:mm
Supermac
 Posted Thu 16 Jul 2015
Supreme Being

Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)

Group: Forum Members
Last Active: Wed 22 Jul 2020
Posts: 153, Visits: 874
Yes language & culture are set to it-IT
none
I replaced modified date values in lang&mail setup with default values, restarted IIS, appl.pool, kartris, admin session, but still I got same trouble... don't know what to try...
Thu 16 Jul 2015 by Supermac
Supermac
 Posted Thu 16 Jul 2015
Supreme Being

Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)

Group: Forum Members
Last Active: Wed 22 Jul 2020
Posts: 153, Visits: 874
UPDATE
the problem isn't related to lang&email setup.
I changed date format in italian record to "dd/MM/yyyy" but after coupon's table cleaning and after some other coupon's creations (coupon's grouping date appears correctly as 16/07/2015 on backend), still obtain the same error with date "16 Lug 15" when try to open group to see coupons generated...
Crying
Supermac Marked As Answer
 Posted Fri 17 Jul 2015
Supreme Being

Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)Supreme Being - (84,861 reputation)

Group: Forum Members
Last Active: Wed 22 Jul 2020
Posts: 153, Visits: 874
UPDATE
In gvwCoupons gridview I changed
<asp:Literal ID="litStartDate" runat="server" Text='<%# CkartrisDisplayFunctions.FormatDate(Eval("StartDate"), "d", Session("_LANG")) %>' />
in
<asp:Literal ID="litStartDate" runat="server" Text='<%# Eval("StartDate") %>' />
and now seems to work.
Coupons date group (gvwCouponGroups) records are clickable and they prompt to coupon's details gridview, visible and editable....
Is still not clear to me why in gvwCoupons gridview I continue to see date as "17 Lug 15"....

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top