Convert datetime to string?

how can i convert
Wed Feb 01 2023 00:00:00 GMT+0000 (Greenwich Mean Time) (DateTime Variable)
to 01.02.23 (String Variable)

@Rowley101

If it is a date variable then use as below

dateVar.ToString("dd.MM.yy")

cheers