Get number of days between two dates in sql
You get number of days between two date using datediff function
Select datediff(Day, date_1,date_2) as NoOfDays
From table
Get number of days between two dates in sql
You get number of days between two date using datediff function
Select datediff(Day, date_1,date_2) as NoOfDays
From table
Join the conversation! Your thoughts help the community grow.
Join to leave a comment
Members earn 10 SHARP for a comment, 10 SHARP for a reaction, and 250 SHARP for every blog they publish.
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegisterMembers onlyeBook · SQLSupabase in Practice: Build and Ship Production Apps on Postgres, from First Table to LaunchDownload nowWrite a blog post and earn +250 SHARP when it is approved.
Write a blog
Prashanth Kumar ThadakaPosted Jun 20, 2021, 4:12 AM EDT
DATEDIFF(Interval, StartDate, EndDate) it returns int.