Home > Net >  Convert CHAR to Date?
Convert CHAR to Date?

Time:10-08

Having a hard time using a column as Date. Its currently in MM/DD/YYYY HH:MM format and I am struggling to convert/cast into date format. Here is the format below.

11/04/2021 12:00

I am able to convert the varchar into char but am not able to use as a date. Any suggestion would be great.

CodePudding user response:

Check out if this helps

select convert(char(10), getdate(), 101)


  ' '   convert(char(5), getdate(), 108);

Thanks!

  • Related