By i25 on
This is a simple question. I'm setting up a View that shows only content that has been posted on the current date. In the Post Date filter, I have the option:
A date in any machine readable format. CCYY-MM-DD HH:MM:SS is preferred.
What value do I enter to signify the current date?
Thanks.
Comments
If you mean the default value
If you mean the default value use the relative value
todayI tried using "today" as the
I tried using "today" as the filter for the Node Post Date, but this is not working. When I preview it, no results show, and when I look at the query, it shows ....WHERE node.created = ***CURRENT_TIME***-61200.
You need to select relative
You need to select relative date.
You may also want/need the date module. It includes a date filter that allows you to specify granularity (in your case you would pick day).
It's still not giving me any
It's still not giving me any results, and I do have the Date module installed. Here is a screenshot of my settings: www.mwebdev.com/at/view.jpg
Try now instead of today
Try now instead of today (though both are supposed to work).
If you do a preview, what does the generated sql look like?
"Now" doesn't work either.
"Now" doesn't work either. Here is the generated SQL:
SELECT node.nid AS nid,
node.title AS node_title,
DATE_FORMAT((FROM_UNIXTIME(node.created) + INTERVAL -14400 SECOND), '%Y%m%d') AS node_created_day
FROM node node
WHERE node.created = 0
ORDER BY node_created_day DESC
Anything? Please see my last
Anything? Please see my last post. Thanks.
Any thoughts on why this is
Any thoughts on why this is not working? Any suggestions?
Guys,I still can't get this
Guys,
I still can't get this to work. It doesn't matter what criteria I place in the date filter, I still get the same results. Placing "now" or "today" in the date filter does not narrow down the results.
Can someone PLEASE help me
Anything guys? This has to be a common question/requirement, although I can't find anything online that gives me good results...
Can someone PLEASE help me with this problem? I'm trying to configure a view to show items with a post date in the past day. I've tried "is equal to" "now" and "today" and "-1 day" but nothing is returning results.
Any ideas?
Thanks!
These are some of the
These are some of the settings I have for my block (that shows upcoming events, if any, and displays the empty text string otherwise):
Defaults: Configure filter Date: Date (node)
Defaults: Configure extra settings for filter Date: Date (node)
The fields I display are the node title, and the custom content date from above.
What settings do I need to
What settings do I need to have to simply show items with a post-date of the current date? I can't use "is equal to" "now" because that seems to interpret "now" quite literally (as in right now), and "today" is not bringing back any results. I tried "is greater than" "-24 hours" and that brought back some results, but that won't always show items posted only on the current date.
I just need to show items posted on the current calendar date.
Just out of curiosity, have
Just out of curiosity, have you set the "granularity" as I indicated in my last post? That should help narrow the resultset.
I did not set the
I did not set the granularity. I don't see any extra settings for the Node: Post Date.
Any further ideas? Thanks.
in my particular situation,
in my particular situation, im using a custom CCK date field... perhaps thats the missing piece here?
Hmmm... looks like that's it.
Hmmm... looks like that's it. I tried adding a filter for a CCK date field and I can see the granularity setting. It seems like everytime a possible solution presents itself, something prevents me from using it.
Is there anyway to have a CCK date field be populated with the Post Date field data for a node? If this is possible, I could create a CCK date field and have it populated with the same data as the Post Date.
Any thoughts guys? It seems like it would be a bit easier than this to filter by the current date. Any suggestions?
Any suggestions guys? I'm
Any suggestions guys? I'm really bumping my head on this one!
Please help! I'm lost and I
Please help! I'm lost and I still can't find anything that is helping me with this date question!
I'm open to suggestions on
I'm open to suggestions on different ways of doing this as well. Any help would be enormously appreciated. Please see the last few posts. Thanks!
scheduler module
this is somewhat related and could maybe help if setup in a different manner
if you use the scheduler module you can use between -24 hours and 24 hours, then set the publishing time to 00:00:00 and run cron just after 00:00:01 the you should have
Use PHP Date Syntax
Here is a link to the PHP Date manual: http://php.net/manual/en/function.date.php
So, to get the current date, you could put something like:
This will get you the Month, Day and Year.
PHP gives you a number of date options, just follow that link and check out some of the examples they give you.
Please enter the date like
Please enter the date like this
CCYY-MM-DD HH:MM:SS => 2014-03-01 00:00:00
---
Kind regards,
Thank you,
Rakesh James
This worked for me. I used it
For Drupal View: A date in any machine-readable format. CCYY-MM-DD HH:MM: SS is preferred.
This worked for me. I used it in a feeds view and entered the date in this format: 2024-05-15 00:00:00.