marcos
|
| Posted: 12/19/2005, 6:00 PM |
|
I think this should be easy,..... but Im lost
I have a url param (datez) in this format: dd-mm-yyyy
I need to convert it to: yyyy/mm/dd to use it in a "Where" sentence, I tryed this approuch:
$str_1 = CCGetParam("datez"," ");
$str_2 = CCFormatDate($str_1,"yyyy/mm/dd");
print $str_2;
$str1 works, but $str_2 dont.. the print statement is for verification purposes.
|
|
|
 |
Benjamin Krajmalnik
|
| Posted: 12/19/2005, 6:38 PM |
|
The second parameter is an array. Try the following:
$str_2 = CCFormatDate($str_1,array("yyyy","/","mm","/","dd");
|
|
|
 |
timdw
Posts: 25
|
| Posted: 12/19/2005, 6:46 PM |
|
Try (untested):
$str_1 = CCParseDate( CCGetParam("datez"," "), array("dd","-","mm","-","yyyy") );
$str_2 = CCFormatDate( $str_1, array("yyyy","/","mm","/","dd") );
.. and search the help file for ccformatdate. It's quite, err, helpful
|
 |
 |
|