date field from SO to CS

date field from SO to cs

if I use a datefield (in this case contact.userdef_id.long08 ) it will shows me a result; something like 1387238400 instead of a date, how can i turn this into a date?

 

RE: date field from SO to CS

Hi Gabriel!

This is epoch time/unix time. And is a number representing number of seconds since 1.1.1970

1387238400 = GMT: Tuesday, December 17, 2013 12:00:00 AM

You can use https://www.epochconverter.com/ to convert or read up on it. There's even a guide on how to get current time from epoch in different programming languages a bit down on the page.

In Service the DateTime class has a function called setUnix(). It takes an integer as parameter, where the integer should be number of seconds since 1.1.1970.

Av: Hans Wilhelmsen 3. okt 2017

RE: date field from SO to CS

A possible way to fix this is to create a CRM script which on save takes the value and creates a string text in date format which you can display in Service.

Av: Simen Mostuen Iversen 3. okt 2017