SQL Server - How To Convert Datetime To Integer

preview_player
Показать описание
If you want to convert datetime to int, you can use this option easily.
Рекомендации по теме
Комментарии
Автор

let's make it complex not just date I need the time as well 20230608 will convert to 2023/06/08 I need the time as well can you share it with me

elwhashms
Автор

How can we do the reverse, like from timestamp to date
Can you share any SQL code for that??

balajiawari
Автор

CAST(CONVERT(nvarchar(8), [RECEIVE_DATE], 112) as INT)

buketbodur
Автор

If I want to convert Int To DATETIME how to do

kritik