0

I have a mysql table.
It contains 2 Column (startdate,enddate)
Both are of DateTime type Using sql

select * from ABC order by (enddate-startdate) DESC;

same thing i want in datamapper...but i m not able to do it Plz help

Shubham Agrawal
  • 559
  • 6
  • 15

1 Answers1

1

Thanks, i got one datamapper function to run sql query directly

repository(:default).adapter.select('select * from ABC order by (enddate-startdate) DESC')


Shubham Agrawal
  • 559
  • 6
  • 15