Simple issue I am sure, but I cannot seem to figure it out. I have the date picker in use to choose a date. Works fine. Problem is that it stores the date day/month/year. I need it to show month/day/year when it hits the TV. Any ideas how to change it?
Thanks,
Mike
PS> How are you supposed to search the forum when everything is too common and therefore ignored? I put in "format date" and it said nothing found because it ignored format and date as they were to common. I even tried forcing it to fond it by saying it had to be found "+Format" and it ignored it anyways. Sorry, just frustrated that I have to ask a question when It probably was answered somewhere but I cannot search it.
Date issue
Re: Date issue
Try the "Data Format" tab for the desired field(s) in AppGini
- Attachments
-
- date_format.jpg (163.08 KiB) Viewed 5446 times
Re: Date issue
Thanks! I remember that part. However I have done so many changes to the script I hate having to regenerate the code just for a date format. Any ideas where the format would be in the generated code?
Thanks again!
Thanks again!
Re: Date issue
Sorry for answering this after such long time @HBMike, if you haven't figured it already, the data format affects "tablename_view.php" and "tablename_dml.php" files ... so you need only to generate those 2 ones (where tablename is the name of the concerned table)
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 issue
No, I still had not found it. But I have now. Thank you. Now to figure out how to write an if statement to check it the date and use a different css if past due. Fun fun fun
Thanks again!
Thanks again!
Re: Date issue
Ok so the code I am playing with is from the "tablename_dml.php" and reads:
This code, if I am correct, actually replaces the code in the template with the date from the database. What I am trying to do is have the result show as red or bold if it is older than the current date. Basically so it can be seen in a glance that it is overdue. Any ideas? I will play with it and see what I can come up with.
Happy Holidays everyone!
Mike
Code: Select all
$templateCode=str_replace('<%%VALUE(order_end_date)%%>', @date('d/m/Y', @strtotime(htmlspecialchars($row['order_end_date'], ENT_QUOTES))), $templateCode);
$templateCode=str_replace('<%%URLVALUE(order_end_date)%%>', urlencode(@date('d/m/Y', @strtotime(htmlspecialchars($urow['order_end_date'], ENT_QUOTES)))), $templateCode);
Happy Holidays everyone!
Mike