Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Show date without time

  • TomTomT
  • TomTomT's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
3 years 2 months ago #226919 by TomTomT
Show date without time was created by TomTomT
Hello,
I am looking to show as a placeholder a date, however it appears with time : example  {birthdate} shows 1985/02/04 00:00
I would like to show only the year/month/day (without the time) : 1985/02/04
Any idea?
Thanks

Please Log in to join the conversation.

More
3 years 2 months ago #226922 by jelo
Replied by jelo on topic Show date without time
LimeSurvey supports the date function from PHP.

date
Format a local date/time
string date(format [, timestamp=time()])

Try somthing like
{date("Y-m-d", strtotime(birthday))}

You can learn more about the formatting here:
www.php.net/manual/en/function.date.php

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users
The following user(s) said Thank You: LISHANGQI, TomTomT

Please Log in to join the conversation.

Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose