Skip to Content Skip to Menu

Obtain correct date formatting

1 year 3 months ago #334631 by wintercorn
Obtain correct date formatting was created by wintercorn
I can't seem to get the register, last visit and last update dates formatted as d/m/Y even though the fields are set as that.  Is this controlled anywhere else?

Thanks

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
1 year 3 months ago #334635 by krileon
Replied by krileon on topic Obtain correct date formatting
How are you rendering them? With a substitution? If you're using [FIELD_NAME] substitutions those are raw unformatted substitutions so you'll always get the database stored value. Use [cb:userfield field="FIELD_NAME" /] for formatted substitutions. See the substitution tutorial below for further usage information.

www.joomlapolis.com/documentation/279-community-builder/tutorials/18353-using-substitutions-throughout-cb


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

1 year 3 months ago - 1 year 3 months ago #334652 by wintercorn
Replied by wintercorn on topic Obtain correct date formatting
Using the following doesn't work:

[cb:userfield field="cb_lastvisitdate" /] - shows a dash
[cb_lastvisitdate] - shows 0000-00-00

The cb_lastvisitdate field is a Date type field. Display parameters are Custom and set to d/m/Y. 

The last visit date is shown as 02/08/2023 08:48:40 in the User Management List.
 
Last edit: 1 year 3 months ago by wintercorn.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48541
  • Thanks: 8290
  • Karma: 1445
1 year 3 months ago #334654 by krileon
Replied by krileon on topic Obtain correct date formatting
[cb:userfield field="FIELD_NAME" /] respects access permissions and display settings. So be sure the field is accessible and set to display on profile. If you don't want it actually visible on profile move it to a tab that's in a not shown on profile position.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum