I have a custom model (called TOOLNAME) in a custom toolbox developed in Model Builder on ArcGIS 10.1 Desktop. The model takes two input parameters (SingleFDI_D and dayindex) and outputs a Derived parameter called "MaxFDI_DateTime" which is data of String type.

The model runs well within the Model Builder on ArcGIS Desktop.

I will need to execute the model in a standalone Python script as well.
My question is how to get the output of MaxFDI_DateTime out of the tool execution in Python.
<SPAN class="">arcpy</SPAN><SPAN class="">.</SPAN><SPAN class="">ImportToolbox</SPAN><SPAN class="">(</SPAN><SPAN class="">TOOL_DIR</SPAN><SPAN class="">)
</SPAN><SPAN class=""></SPAN><SPAN class=""># The custom model should return a result in String, how to retrieve it here?
</SPAN><SPAN class="">model_result </SPAN><SPAN class="">=</SPAN><SPAN class=""> arcpy</SPAN><SPAN class="">.{</SPAN><SPAN class="">TOOLNAME</SPAN><SPAN class="">}</SPAN><SPAN class="">_</SPAN><SPAN class="">{</SPAN><SPAN class="">TOOLBOX_ALIAS</SPAN><SPAN class="">}(</SPAN><SPAN class="">SingleFDI_D</SPAN><SPAN class="">,</SPAN><SPAN class=""> str</SPAN><SPAN class="">(</SPAN><SPAN class="">day</SPAN><SPAN class="">))</SPAN>