Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert date
Message
De
05/05/2014 12:02:08
 
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Versions des environnements
SQL Server:
SQL Server 2012
Application:
Web
Divers
Thread ID:
01599545
Message ID:
01599564
Vues:
41
>>>We've got a data file that has dates in 'dd-mm-yyyy (time)' format (and coming in as a string) and need them in 'standard amurican' 'mm-dd-yyyy (time)'.
>>>
>>>What's the best way to do this conversion?

>>>
>>>Have you tried using the CAST() function?
>>
>>Cast just has issues, Convert says "Conversion failed when converting date and/or time from character string
>
>Use TRY_CONVERT function in SQL Server 2012.

I forgot to set the SQL version, sorry - we're 2008 R2
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform