Solved

globalization error when switching to spanish

Posted on 2013-06-06
1
109 Views
Last Modified: 2013-07-30
Conversion from string "6/29/2012 12:00:00 AM" to type 'Date' is not valid.

this is my label

                                                    <asp:Label ID="Label15" runat="server" CssClass="titleboldblackmodels " Text='<%# IIf(Eval("InvDate") <> Nothing, FormatDateTime(Eval("InvDate"), DateFormat.ShortDate), "")%>' Visible="true"></asp:Label>&nbsp;
0
Comment
Question by:Wigging
1 Comment
 
LVL 16

Accepted Solution

by:
Kalpesh Chhatrala earned 500 total points
ID: 39227900
try like below

 <asp:Label ID="Label15" runat="server" CssClass="titleboldblackmodels " Text='<%# IIf(Eval("InvDate") <> Nothing, DateTime.ParseExact(Eval("InvDate"), "dd/MM/yyyy HH:mm:ss tt",
                                  null), "")%>' Visible="true"></asp:Label>&nbsp;

Open in new window

0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
WPF - Tooltips for ComboBox items 5 76
Exit the loop 4 45
Call an IPL program from vb.net and pass in a file location parmeter 2 23
.NET 2008 VB and C# 6 28
I think the Typed DataTable and Typed DataSet are very good options when working with data, but I don't like auto-generated code. First, I create an Abstract Class for my DataTables Common Code.  This class Inherits from DataTable. Also, it can …
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …

825 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question