Quantcast
Channel: SQL Server Database Engine forum
Viewing all articles
Browse latest Browse all 5123

How to identify date format if it is in NVARCHAR data type

$
0
0

Hi All,

I am facing issue where I couldn't identify difference in between two date formats which are in NVARCHAR data type.

For example:

I am having one value with DD/MM/YYYY format and other is in YYYY/DD/MM format. Both values having NVARCHAR data type.

I can convert them individually in desired date format, So now my problem is how do I identify which format is coming in NVARCHAR data type out of 2 different date formats.

I want to put this condition in case statement and run select statement.


Viewing all articles
Browse latest Browse all 5123

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>