I have been using some tools to generate my php code as i have little knowledge of php.

the tools are ok but the support is rubbish.

everything is generated in US date and time format and i need it to be in UK.

anyway to cut a long story short they want me to modify the code their tools create however i have no knowledge and i go around in circles with them time wasting when i just need to get around this.

this is what they have came back to me with:

//add a comparison argument from an edit box
function addComparisonFromEdit($Column,$EditName,$Logical,$Comparison,$FieldType) {
$theValue = WA_DBS_PostOrGetField($EditName);
if (isset($theValue) && $theValue != "undefined" && $theValue != "") {

The WA_DBS_PostOrGetField($EditName); is what gets the date. If you reformat the date from the UK format to the correct search format, you should get the correct start date search.

On your results page, there should be some code that looks like this:
//comparison list additions
$WADbSearch1->addComparison("HistoryDate","".WAQB_getEndDate($_POST["enddate"]) ."","AND","<=",2);

with different form field names (I used begdate and enddate) and also different column names (I used HistoryDate). To get the end date to search correctly, you will want to format the $_POST["enddate"] to the correct search format from your UK value.

i need to modify this using a string function into uk format however i do not know how i would write this and where it woudl go in the code he has told me to modify?

could someone with PHP knowledge help tell me where i would add the string function to the code as i do not know where it would go?

i think i add gmdate by looking on php.net but i am not sure and not sure where to add.

thank you all for your great help.

This forum is great.

just wish the company i am dealing with who i pay to use their product were better.(little moan, sorry)

many thanks

8 Years
Discussion Span
Last Post by almostbob

Thanks for the help, i added this however i get an error:

Fatal error: Call to undefined function: date_default_timezone_set()

I added in


at the start but no luck.

could you help please?

many thanks


post the code , the real problem is easier to fix, than someones explanation of the problem

Edited by almostbob: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.