0

Need to get the date part from column Start_DateTime (varchar data type) which is having data like '06/04/19 10:44 AM CDT' , '06/10/19 11:56 AM EDT' and need to convert the time zone to CST time zone

I have a user defined function dbo.fn_UTCtoCST that will convert the time zone but am trying to combine all this in a select query to get the desired result

SELECT 
            Start_DateTime
           ,Inspector
           ,Status
           ,Distance
           ,Location
from XYZ
a_horse_with_no_name
  • 497,550
  • 91
  • 775
  • 843
Tulsi
  • 1
  • 2

1 Answers1

0

If your function is scalar value function(returning one value) then this might will work for you.

select * 
from A 
  cross apply dbo.fn_UTCtoCST(date)  cstdate.
a_horse_with_no_name
  • 497,550
  • 91
  • 775
  • 843
Mak
  • 1,020
  • 6
  • 19