Forums Register Login

how to use interval keyWord in mySql

+Pie Number of slices to send: Send
Hi,

select yearweek_id,start_date,end_date from yearweek where start_date between date '2012-07-03' + INTERVAL '25 weeks' and date '2013-11-14' - INTERVAL '2 weeks'
when i have used this query in postgresSql,iam getting results,but when iam trying to use this in MySql iam getting error as
:


can you please help me in this
+Pie Number of slices to send: Send
Not all databases use the SQL standard for date arithmetic. To search for a specific database implementation, I'd suggest using Google with keywords <database> date arithmetic, eg. mysql date arithmetic.
+Pie Number of slices to send: Send
i need to run this query in hibernate we need to add criteria for this like :



i need to write like this..
+Pie Number of slices to send: Send
I have used HQL for this ,now iam able to make it...i have added days by using Calendar class
Sometimes you feel like a nut. Sometimes you feel like a tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1378 times.
Similar Threads
VERY URGENT Please help me
using MySql
datepart error
modifying date in mysql
what wrong with 1=1 ?
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 07:00:43.