This topic is locked
[SOLVED]

 Date filter help needed

7/17/2012 2:50:45 PM
PHPRunner General questions
I
Ivan van Oosterhout author

Hello everyone,
Maybe somebody can help me with a Date thing...
I have a table with date and time in it, stored in here > $values["ts_invoer_tijd"]

like this format:

2012-07-17 20:27:09
I need to filter this value:207 without - from my date and time

2012-07-17 20:27:09
I got lost in the date battle, maybe sombody could help me please...

and where can i place my code? before record added, after???
Kind regards

Ivan

C
cgphp 7/17/2012

In the "After record added" event:

$last_year_digit = substr(date('Y',strtotime($values['ts_invoer_tijd'])), -1);

$month = date('m',strtotime($values['ts_invoer_tijd']));

$pattern = $last_year_digit . $month;
I
Ivan van Oosterhout author 7/17/2012

Your the man Cristian!!
Many thanks
Regards Ivan