sandy1028 Posted October 18, 2007 Share Posted October 18, 2007 Hi, Please help me how to write a query to select the data from current day start timestamp "YYYY-mm-dd 00:00:01" to the timestamp "YYYY-mm-dd 23:00:01" from a table Quote Link to comment https://forums.phpfreaks.com/topic/73784-query/ Share on other sites More sharing options...
sandy1028 Posted October 18, 2007 Author Share Posted October 18, 2007 Hi, If the data is present only till the current timestamp how to make the values as zero for the later timestamp values which is not present Quote Link to comment https://forums.phpfreaks.com/topic/73784-query/#findComment-372252 Share on other sites More sharing options...
fenway Posted October 19, 2007 Share Posted October 19, 2007 I'm not sure I understand.. you want to limit the values to today? Any given day? Quote Link to comment https://forums.phpfreaks.com/topic/73784-query/#findComment-373142 Share on other sites More sharing options...
sandy1028 Posted October 22, 2007 Author Share Posted October 22, 2007 hi, For today's timestamp. Suppose the timestamp is 2007-10-22 12:30:02 select the data till 2007-10-22 12:30:02 from 2007-10-22 00:00:01. And make the values from 2007-10-22 12:30:02 to 2007-10-22 23:50:02 initialse to 0 Quote Link to comment https://forums.phpfreaks.com/topic/73784-query/#findComment-375292 Share on other sites More sharing options...
fenway Posted October 22, 2007 Share Posted October 22, 2007 hi, For today's timestamp. Suppose the timestamp is 2007-10-22 12:30:02 select the data till 2007-10-22 12:30:02 from 2007-10-22 00:00:01. And make the values from 2007-10-22 12:30:02 to 2007-10-22 23:50:02 initialse to 0 So you want to select data from NOW until today at midnight. I get that part... but not the next part. Quote Link to comment https://forums.phpfreaks.com/topic/73784-query/#findComment-375454 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.