0

I want to convert Non-Standard Date Formats to Standard Date format. Table has Column_A and Column_B I have column_A as input and I want the corresponding value on column_B.

enter image description here

lakshmi
  • 1
  • 2
  • 1
    Which dbms are you using? When it comes to date/time many products are far from ANSI SQL compliant. – jarlh Mar 15 '18 at 09:57
  • 1
    also post your query what you have tried – Sas Mar 15 '18 at 10:00
  • sql server 2012 – lakshmi Mar 15 '18 at 10:01
  • Oops.. the image is hyperlinked with the question. i wasnt aware – lakshmi Mar 15 '18 at 10:02
  • How do you expect to be able to distinguish between 11/2 and 2/11 (just one example!). Basically, your problem is *exactly* why you store dates in a date/datetime and not as text. And if this is an import, then you need to either have a standardiszed format or include information in the import as to the format of the date. You cant magically know the right format. – Jamiec Mar 15 '18 at 10:09
  • Exactly, that's one of the problem. I would not take the future date. 2017/11/02 will be date format and not 2018/11/02 – lakshmi Mar 15 '18 at 10:18
  • As Jamiec said, Input column is not a standard insert. in this case you might have to write query for every row – Sas Mar 15 '18 at 10:25
  • can it be done through Regex? – lakshmi Mar 15 '18 at 17:11

0 Answers0