datetime - Get Number of Weeks that have passed from a certain date to today SQL -


im trying design table column has total number of weeks have passed static, hardcoded date, until today. example, if today june 27, 2014, want find how many weeks have passed since may 31st, 2012; program here return 108 weeks.

most results have found have week counter roll on @ each new year, find keeps counting past 52.

im using sybase ase db if help.

you can use datediff function:

select datediff(wk, '2012-08-20', '2014-06-27'); 

as described here or here:


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -