Suoritettu

Quick Help to Solve TCPDF Template Issue (Changing Date Format)

I need to modify some code on a TCPDF Invoice template to change the date format.

The current code is:

$pdf->Cell(0,6,$_LANG["invoicesdatecreated"].': '.$datecreated.'',0,1,'L','1');

$pdf->Cell(0,6,$_LANG["invoicesdatedue"].': '.$duedate.'',0,1,'L','1');

This code shows on the generated PDF this text:

Invoice Date: 2016/05/07

Due Date: 2016/05/14

So it currently shows the dates in Y-m-d format, and I need to show them in this format: m-d-Y

I have tried using this modified code:

$pdf->Cell(0,6,$_LANG["invoicesdatecreated"].': '.$datecreated('m-d-Y').'',0,1,'L','1');

$pdf->Cell(0,6,$_LANG["invoicesdatedue"].': '.$duedate('m-d-Y').'',0,1,'L','1');

But I am getting this error message:

Fatal error: Call to undefined function 2016/05/07() in …/[url removed, login to view] on line 60

While this other line (where the same date format expression is used) is working properly:

$pdf->TextField('date', 30, 5, array(), array('v'=>date('m-d-Y'), 'dv'=>date('m-d-Y')));

So I need you to please tell me how to modify the previous code, so the Dates are shown in the required format (m-d-Y).

Taidot: PHP, Smarty PHP

Näytä lisää: apply a delphi techniques to help the business owner to solve his her problem, need quick help, help solve, want help solve stupid problem, php function quick help, quick help computer security, quick recover help physiotherapy, quick help access, vector logo quick help, quick help, quick books help, php date format changing, excel macro javascript date format issue, changing date format excel column visual basic, help set quick book, quick javascript help coder, help need quick simple website, flash contact form template help php, format oscommerce template, excel changes date format csv

Tietoa työnantajasta:
( 8 arvostelua ) Buenos Aires, Argentina

Projektin tunnus: #12990791

Myönnetty käyttäjälle:

khyatiraval

We have 6+ years experience in PHP, Wordpress, Joomla, Magento, Prestashop, CSS, JQuery, HTML, HTML5, PSD to HTML, PSD to responsive HTML etc. We also developed many software applications for banking, accounting, code Lisää

$25 USD 1 päivässä
(148 Arvostelua)
6.6

2 freelanceria on tarjonnut keskimäärin %project_bid_stats_avg_sub_26% %project_currencyDetails_sign_sub_27% tähän työhön

sdgcode

Hi, I can do your project now, you can read my reviews about my skills. If you have a question, please contact me. Regards

$30 USD 0 päivässä
(49 arvostelua)
6.6
gurmejwahla

hi dear I have 5 year experience I can show you I start now and will finish asap

$35 USD 0 päivässä
(2 arvostelua)
1.8
Makerites

we are having the experience of 6 years and also provide surety of quality work. we have the team with innovative & creative ideas and experienced developers in PHP,Hybrid, IOS, Android, Applications,SEO, Google Ana Lisää

$15 USD 1 päivässä
(1 arvostelu)
1.3