By DickSwart on
How can I send 'n cck date field the current date and time? I'm using rules to do a action of populate another field (end date), how can I sent the end date field the current date and time? please help.
How can I send 'n cck date field the current date and time? I'm using rules to do a action of populate another field (end date), how can I sent the end date field the current date and time? please help.
Comments
=-=
with rules I don't know but I use
now which pulls the the date/time of now
_
iirc you can do this with php in rules: http://us.php.net/manual/en/function.strtotime.php
Yes but how do I pass it
Yes but how do I pass it code? I dont know what it should look like? cant find any examples of how to format the code?
Advanced: Specify the fields value with PHP code
Dont understand what they
Dont understand what they want?
_
Try this:
return array(
0 => array('value' => strtotime("now")),
);
Just a guess though.
Just like that thanx
Just like that thanx, if i want to do something with %node.created to I also have to use strtotime(%node.created).
Say for example work out the duration.
_
datetime math is a little tricky-- however, afaik, the value you would use for create date would be
$node->createdor the[node:date]token (if you use the token module). I have no idea what '%node.created' is.