Solved - Date Format on DBjoin

BigStef

Member
Hi,
When i call a date field on databasejoin in concat label, it return all date (something like "2002-05-07 12:10:46"). But i only need the date formated like this : %d/%m/%Y

I have read in this forum to try with something like :
DATE_FROMAT({thistable}.myfield_name, '%d/%m/%Y')

But it give me an error, and there's nothing more precised in the topic where i found this tip. Anyone could help me there ? Thanks by advance...
 
Have you tried setting that format in your date element? I thought the dbjoin pulled the label not the value.
 
Hi Rackem, and thanks for answering :)
Yep.. the date on date element is formatted as "%d/%m/%Y"
It is only when it is called thrue the concat that it appear like this... On its original list, I have the good format.
If needed, I have joined some screenshots :
original_param.jpg This is the original date element params

original_list.jpgThis is how date appear in its original list (correct)

join_list.jpgThis is how date appear in joindb (not correct)

join_param.jpg This is how the date concat element is parametted
 
You're initial idea is correct. When building the database join query we are querying the data stored in the database, so its going to be in the format yyyy-dd-mm hh:mm:ss.
This is not affected by any date setting you might have in the fabrik element.

So for me this concat label works...

Code:
DATE_FORMAT({thistable}.lastvisitDate, '%d/%m/%Y')

what was the initial error message you got?
 
Hi Rob , Thks for the suggestion...
In fact it came from the "how" i wrote my concat...

When I writte :
Code:
nom , ' ', prenom , ' - ', sexe , ' - N?(e) le :', date_naissance
It works ecxpet the fact that the date is yyyy-dd-mm hh:mm:ss

Now when i writte :
Code:
nom , ' ', prenom , ' - ', sexe , ' - N?(e) le :', DATE_FORMAT({thistable}.date_naissance, '%d/%m/%Y'),

I get my the error MySQL message

AT the end I wrote :
Code:
nom , ' ', prenom , ' - ', sexe , ' - N?(e) le :', DATE_FORMAT({thistable}.date_naissance, '%d/%m/%Y')

Without the comma at the end (the error cames from there)...
And every things works now...
 
  • Like
Reactions: rob
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top