converting datetime to float in sql
Hello, I have a question, how do I convert the difference of the following dates, for example: (2023-01-02 18:00:00)-(2023-01-01 17:00:00) into a decimal number?
I know how the conversion to an integer happens(cast(cast(test as date) - cast(testtwo as date) as int), but here I am confused.