Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using CONVERT() function
Message
De
07/02/2019 11:22:15
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Stored procedures, Triggers, UDFs
Divers
Thread ID:
01666022
Message ID:
01666031
Vues:
35
>Thank you for both replies. What happens is that if the value of @TargetDate is NULL, all works.
>Or if the value of @TargetDate from the XML type is American format (that works for many customers), all works.
>But when I set the value in the ASP.NET application to the XML element TargetDate, I get error.
>Why I do it this way is a long story. But it works for many years.
>Now I need to figure where it breaks for the British date.

"if the value of @TargetDate from the XML type is American format" - That is what I am saying, in the XML the format for a DateTime is fixed, regardless you are living in US or Turkey, or choose any place you like. It is like:

2019-02-28T19:00:00+03:00

I don't understand what does XML datetime have to do with ToShortTimeString(). Are you sure your XML is defining a DateTime type?
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform