Jump to content

get current year problem.


piheshpi90

Recommended Posts

im trying to create sql that display data from current year.so im using datepart().but error says -->FUNCTION e_latihan.DATEPART does not exist. why it say like that.can anybody help me find a resolution?

 


"SELECT * FROM aktiviti WHERE year(`tarikh_akhir`)=DATEPART(GETDATE())  OR year(`tarikh_awal`) = DATEPART(GETDATE()) ";


Link to comment
https://forums.phpfreaks.com/topic/227580-get-current-year-problem/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.