Hi
Me again - sorry to bombard!
I want the date in TV to be like: 19th March 2014
It currently appears as 19-03-2014 in TV, even though.....
I have set the format as per image below:
I have localization set as per image below:
In MySQL it is set as "Date" type.
Any thoughts please?
Thanks in advance.
Adz1111
Date format not as expected in TV
Re: Date format not as expected in TV
In the generated "tbltimesheets_view.php" file, you'll find a block of code starting with the following comment:
Could you kindly post this block here to see how the date is getting formatted in the table view?
Code: Select all
// Fields that can be displayed in the table view
AppGini plugins to add more power to your apps:
- DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
- Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
- Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.
Re: Date format not as expected in TV
Thanks Ahmad - please see block as requested below...
Code: Select all
// Fields that can be displayed in the table view
$x->QueryFieldsTV=array(
"`tbltimesheets`.`TimesheetID`" => "TimesheetID",
"IF( CHAR_LENGTH(`tbltimesheets1`.`TimesheetID`), CONCAT_WS('', `tbltimesheets1`.`TimesheetID`), '') /* User */" => "User",
"if(`tbltimesheets`.`WeekCommencing`,date_format(`tbltimesheets`.`WeekCommencing`,'%d-%m-%Y'),'')" => "WeekCommencing",
"IF( CHAR_LENGTH(`tblclients1`.`ClientName`), CONCAT_WS('', `tblclients1`.`ClientName`), '') /* Client */" => "ClientID",
"IF( CHAR_LENGTH(`tblclientcontacts1`.`ContactName`), CONCAT_WS('', `tblclientcontacts1`.`ContactName`), '') /* Client Contact */" => "ClientContactID",
"IF( CHAR_LENGTH(`tblagencies1`.`AgencyName`), CONCAT_WS('', `tblagencies1`.`AgencyName`), '') /* Agency */" => "AgencyID",
"IF( CHAR_LENGTH(`tblagencycontacts1`.`ContactName`), CONCAT_WS('', `tblagencycontacts1`.`ContactName`), '') /* Agency Contact */" => "AgencyContactID",
"`tbltimesheets`.`MondayHours`" => "MondayHours",
"`tbltimesheets`.`TuesdayHours`" => "TuesdayHours",
"`tbltimesheets`.`WednesdayHours`" => "WednesdayHours",
"`tbltimesheets`.`ThursdayHours`" => "ThursdayHours",
"`tbltimesheets`.`FridayHours`" => "FridayHours",
"`tbltimesheets`.`SaturdayHours`" => "SaturdayHours",
"`tbltimesheets`.`SundayHours`" => "SundayHours",
"if(`tbltimesheets`.`ClientApprovedDate`,date_format(`tbltimesheets`.`ClientApprovedDate`,'%d-%m-%Y'),'')" => "ClientApprovedDate",
"`tbltimesheets`.`TotHours`" => "TotHours",
"`tbltimesheets`.`TotDays`" => "TotDays",
"`tbltimesheets`.`SignedTimesheet`" => "SignedTimesheet"
);