Convert Integer Date to Date-time format
The Problem
Date information from the source is represented as an integer, with the format YYYYMMDD. We need the information to be represented as a date-time data type in Sisense.
The Solution
This will utilize a custom field to convert the value. The original date value needs to be defined in the ElastiCube as an integer data type. The following code gets the correct results:
CreateDate(
ToInt(Substring(ToString([Date Num]),1,4)),
ToInt(Substring(ToString([Date Num]),5,2)),
ToInt(Substring(ToString([Date Num]),7,2))
)
Updated 02-07-2024
intapiuser
Admin
Joined December 15, 2022