Welcome Guest, Not a member yet? Register   Sign In
Get today's posts
#5

(09-17-2019, 01:25 PM)demyr Wrote: Doesn't TimeStampDiff  approach help?

PHP Code:
->where('TIMESTAMPDIFF(DAY, start_date, now()) <= 180'

Thanks it works. 
Is it possible to change the 180 so that it shows posts  for today only ?
i changed 180 to 24 it shows me many posts than expect, i just want today's posts and since i'm using sql server i changed TIMESTAMPDIFF to DATEDIFF
Reply


Messages In This Thread
Get today's posts - by tp45 - 09-17-2019, 08:35 AM
RE: Get today's posts - by jreklund - 09-17-2019, 11:53 AM
RE: Get today's posts - by tp45 - 09-17-2019, 01:05 PM
RE: Get today's posts - by demyr - 09-17-2019, 01:25 PM
RE: Get today's posts - by tp45 - 09-17-2019, 02:12 PM
RE: Get today's posts - by demyr - 09-17-2019, 02:16 PM
RE: Get today's posts - by tp45 - 09-17-2019, 04:33 PM
RE: Get today's posts - by jreklund - 09-18-2019, 10:19 AM
RE: Get today's posts - by tp45 - 09-18-2019, 10:40 AM
RE: Get today's posts - by jreklund - 09-18-2019, 11:34 AM
RE: Get today's posts - by tp45 - 09-18-2019, 02:58 PM
RE: Get today's posts - by jreklund - 09-19-2019, 10:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB