On Thu, 11 Oct 2012, Javsolis3 wrote:
>
>
> 1. if ($fecha == NULL) {
> 2. $file_fech = qmopen("ARCH.FECHA");
> 3. $regfech = qmread($file_fech,'VT');
> 4. $campo_fech = explode <
http://www.php.net/explode>("�", $regfech);
> 5. $fecha = $campo_fech[0];
> 6. $hora = $campo_fech[2];
> 7. $fecha_final = $fecha.$hora;
> 8.
> 9. $fecha = date <
http://www.php.net/date> ("d-M-Y", $fecha_final);
>
>
> el me arroja la fecha del 01-Oct-2021 y me debe arrojar la actual a ver si
> me dan la manito con esto
> si necesitan mas info me comunican vale gracias !!!
If you don't want to write the routine in PHP to do the date conversion, I
would create a subroutine on the host side and call it with the QMCall()
routine.
For example, you could create this BASIC routine:
subroutine conv.qmcall(type, inval, conversion, outval)
begin case
case type = "I"
outval = iconv(inval, conversion)
case type = "O"
outval = oconv(inval, conversion)
case 1
outval = "INVALID CONVERSION"
end case
return
Compile & catalog and then call it like so:
qmcall("conv.qmcall", 4, "O", $pick_date, "D2-", $php_date);
BTW, where did you get the php library? I didn't know one was available.
:)