A datetime doesn't have that level of precision, instead use datetime2:
select cast('2020-10-10 07:30:00.0000000' as datetime2); And to only show the desired string, cast it to a shorter string:
select cast(cast('2020-10-10 07:30:00.0000000' as datetime2) as varchar(19)); Obviously it makes no sense to cast a string to date and back again, but I assume you have simplified youractualyour actual use-case. Otherwise you could use:
select cast('2020-10-10 07:30:00.0000000' as varchar(19));