How to get the time stamp with seconds in adobe analytics | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by yuhuisg

@reddy_y-11  adding one more caveat:

Since eVar values are always strings, don't expect to perform any calculations on your tracked timestamp values, e.g. don't expect to use a filter like "1 day before tracked value". AA recognises your tracked values as strings (I have to keep emphasising this), e.g. "14:23:56" would be interpreted as "fourteen colon twenty-three colon fifty-six".

1 reply

yuhuisg
Community Advisor
Community Advisor
April 11, 2023

Firstly, there's no need to mention other community members in your post, since most of us tend to browse the forum every day (or almost every day). Eventually, someone would reply.

Since eVar values are always strings, then to get your desired format, you would have to set the timestamp with your desired string format, e.g.

s.eVar10 = "14:23:56"; // set a string as the value
Jennifer_Dungan
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
April 11, 2023

Just remember, when collecting data into eVars, this will use JS to set the values, and be subject to the user's system time (if their clock is wrong, or in a different time zone) it will all be based on that... and while yes, you can convert times to UTC, if the time is set completely wrong, it will be converted based on that incorrect time.

yuhuisg
Community Advisor
yuhuisgCommunity AdvisorAccepted solution
Community Advisor
April 12, 2023

@reddy_y-11  adding one more caveat:

Since eVar values are always strings, don't expect to perform any calculations on your tracked timestamp values, e.g. don't expect to use a filter like "1 day before tracked value". AA recognises your tracked values as strings (I have to keep emphasising this), e.g. "14:23:56" would be interpreted as "fourteen colon twenty-three colon fifty-six".