“Tanggal Diff SQL” Kode Jawaban

Tanggal SQL Diff

SELECT DATEDIFF('2022-04-08',Date('2022-04-06 20:23:08')) as days,
TO_DAYS('2022-04-08') - TO_DAYS(date('2022-04-06 20:23:08')) as todays

//hours
SELECT TIMESTAMPDIFF(HOUR,NOW(),'2013-05-15 10:23:23')
   calculates difference in hour.(for days--> you have to define day replacing hour
buddy123

Tanggal Diff SQL

SELECT DATEDIFF(year, '2017/08/25', '2011/08/25') AS DateDiff;
Tense Tern

Jawaban yang mirip dengan “Tanggal Diff SQL”

Pertanyaan yang mirip dengan “Tanggal Diff SQL”

Lebih banyak jawaban terkait untuk “Tanggal Diff SQL” di Sql

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya