Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Create pattern searching and expression for string datetime details available in table?

$
0
0

Hi,

I have a table, where i one column whose data is date but column type is varchar(100). This date is available in all format like mm/dd/yy,mm/dd/yyyy,mm-dd-yy,mm-dd-yyyy so on.

I want to create pattern searching for this column.

I dont know the exact approach for doing it. Can anybody suggest me any good approach on Pattern searching for datetime?

Just consider below example-

create table #temp1(Joining_Date varchar(100))
insert into #temp1 values ('01-Nov-2013')
insert into #temp1 values ('01/Nov/2013')
insert into #temp1 values ('Nov,1,2013')

Here i want to apply pattern searching for above scenario.

Thanks,

Maggy!


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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