$sql = "select SupplierCode,ConfirmNbr,AmtRcvd,DateRcvd, Description,IDOC,InvoiceNbr from importCmsReceipts where AgencyId = $strAgencyId ";
$strDateRcvd = $row['DateRcvd'];
$strArray = explode('-',$strDateRcvd);
$strDate = strval($strArray[2]) . '-' . strval($strArray[1]) .'-' . strval($strArray[0]);
$pdf->Cell(30,15,'$strDate');
ASKER
$sql = "select SupplierCode,ConfirmNbr,Convert(varchar,AmtRcvd,1)as AmtRcvd, Convert(varchar,DateRcvd,101) as DateRcvd,
Description,IDOC,InvoiceNbr from importCmsReceipts where AgencyId = $strAgencyId ";
ASKER
$pdf->Cell(40,15,$strPassenger,0,0,'L');
Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.
TRUSTED BY
For the number, you can use the number_format() function:
number_format($row['AmtRcv
For the date, you're often better off using the DateTime class and then formatting the output however you need:
$date = new DateTime($row['DateRcvd'])
echo $date->format('m-d-Y'); // outputs 01-30-2020
It may help you to visualise your data once you've retrieved the records from your DB. You can easily do this using var_dump:
var_dump($row);
That should show you exactly what's coming back from your DB.
Also, I would expect the Cell() method to take your variable without the quotes. As you have it, you're just sending in a string of '$strDate', so this:
$pdf->Cell(30,15, $strDate);