My concatenation using this formula is working correctly:
concat(${observer}, "-",${species},"-",${date},"-",${time})
However the time in epoch format is not friendly to quick review.
What formulas or formatting can I use inside this formula to return the epoch value stored in {time} to display in a text box as "YYYY-MM-DD - H:m:s" -- including any corrections for time zone and or origin in 1970?
Solved! Go to Solution.
Voila Merci. Upgrade to 1.10 was the resolution.
Anyone seen a formatting instruction formula for displaying time or date data as year, month, day using the value stored in a previous answer?
Did you try this?
date(${dateQuestion})
Thanks Ismael, part of the direction I needed!
The function
date(${dateQuestion})
also returns the time, but when using the date picker the time is set at 00:00:00 and displays it with the date, so I tried this:
date(${obstime})
The observation time ${obstime} is filled using the time picker and returns a date and time formatted like this (below) which will be suitable for my needs for now:
Tue Jul 19 08:46:25 2016 GMT-0700
This formula for my instance name now works as follows:
concat(${observer},"-",${species},"-",date(${obstime})
However, not sure how to force the format-date function to work or if it is supported in Survey 123.
This calculation
format-date(${obstime}, '%Y/%n/%e %H:%M:%S')
currently returns
%Y/%n/%e %H:%M:%S
Joe
did you find an answer to this. i'm trying to format my date(${DATES}) with yyyy_mm_dd as part of a concat field...
but am having difficulty finding the correct syntax. Like you. I tried using format-date (
format-date(${DATES},'%n')) |
but it the actual result shows up as '%n'
Did you try this? format-date(${DATES},'%Y/%n/%e') or this ? format-date(${DATES},'%Y_%n_%e')
Does the additional parentheses on the left make a difference?
format-date((${DATES},'%Y/%n/%e')
Or should it be:
format-date(${DATES},'%Y/%n/%e')
the extra bracket on the left throws and error. I completed it with an end bracket. still no joy.
I tried:
format-date(${DATES},'%Y/%n/%e') |
and what I get in the survey: