1. mahmoud
  2. Support
  3. Wednesday, April 27 2016, 11:51 AM
Hi,

I would like to ask how to show last visit data and time instead of just date?

thanks to help me in achieving this
admin Accepted Answer
Admin
Hi,
in file /components/com_jsn/views/profile/tmpl/default.php we use language constant "DATE_FORMAT_LC3" to translate SQL date into current format, so you have 2 options:

1. Override layout file and use your format (this require PHP and Joomla Dev Knowledge)

2. Add a language override for constant DATE_FORMAT_LC3, go to Administration->Extensions->Languages->Overrides->New button, and put this details (like screenshot):
- Language constant: DATE_FORMAT_LC3
- Text: d F Y H:m
Attachments (1)
  1. more than a month ago
  2. Support
  3. # 1
mahmoud Accepted Answer
Content Protected
  1. more than a month ago
  2. Support
  3. # 2
admin Accepted Answer
Admin
Hi,
in users list the constant is "DATE_FORMAT_LC1"
  1. more than a month ago
  2. Support
  3. # 3
mahmoud Accepted Answer
Hi,

Just a little modification for anyone viewing this:

using this data time format "d F Y H:m" will echo the time wrong as "m" is used to show month in numbers for example (August --> 08) and not minutes.

the correct format for showing date\time should be "d F Y H:i", Day, Month, Year, Hours:minutes (24 hours format).

for 12 hours AM/PM format use this "d F Y h:i A".

for showing Day of the week use this "D, d F Y, h:i A".

BR,
  1. more than a month ago
  2. Support
  3. # 4
admin Accepted Answer
Admin
Great, thanks for your explanation, I hope this can be helpful for many users, anyway you can see all possible values at http://php.net/manual/en/function.date.php
  1. more than a month ago
  2. Support
  3. # 5
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.