Hello,
I have configured a date field and it should have this format: d/m/Y. I have chosen the UK short Date/Time in the data format tag of the field in appgini. I have also configured this in the database cofiguration option of appgini software (Localization Settings), however my control_view.php files do not change the format m/d/Y to the format I want, so I have to do it manually.
The problem is that, everytime I make a change in my software, it generates the control_view.php, so I have to change those values every time.
Does anybody knows if this is a bug, or it is something I am not doing right?
Thanks in advance,
Wilfredo Mira
Date format in tablename_view.php
-
- Veteran Member
- Posts: 45
- Joined: 2015-04-15 06:33
- Location: Hyderabad
- Contact:
Re: Date format in tablename_view.php
hi wilmira,
I think you have control.php file in hooks folders of your application so there you can change the format of the day as like you want.
function control_before_insert(&$data, $memberInfo, &$args)
{
$data['date']=date_format($data['date'],"Y-m-d h:i:s");//change the date format as you want
}
you can place the date change code in either before insert or after insert functions.
from the above changes you need not to change the format again again in any where it will change its format automatically depending upon your code.
thanks&Regards
Satya kavala
[email protected].
I think you have control.php file in hooks folders of your application so there you can change the format of the day as like you want.
function control_before_insert(&$data, $memberInfo, &$args)
{
$data['date']=date_format($data['date'],"Y-m-d h:i:s");//change the date format as you want
}
you can place the date change code in either before insert or after insert functions.
from the above changes you need not to change the format again again in any where it will change its format automatically depending upon your code.
thanks&Regards
Satya kavala
[email protected].