Skip to main content
Question

I would like to display the fields AFKO.GSTRI and AFKO.GETRI as timestamps to be able to use the KPI "Days_Between". But I always get an error message however the fields AFKO.GSTRS and AFKO.GLTRS are displayed properly without any problems.

  • November 22, 2021
  • 4 replies
  • 1 view

I'm using the formular:

TO_TIMESTAMP("AFKO"."GSTRI", 'YYYY.MM.DD')

and I'm getting the following error message - see attached screenshot 1

 

I'm using the same formular for "AFKO.GSTRS and there are no errors at all - see screenshot 2.

 

Please help.

 

Thanks a lot

Anne

 

Error on GSTRI No error on GSTRS

4 replies

  • Level 8
  • November 22, 2021

Hi @anne.würz ,

Normally the days_between() function has as input two dates, upon my knowledge AFKO.GSTRI and AFKO.GETRI  are already dates. Which result do you have when applying directly days_between(AFKO.GSTRI ,AFKO.GETRI).?


  • Author
  • Level 1
  • November 22, 2021

Hi @javier.donos ,

 

this was also my first assumption. So, I already tried this and get the following error message - see screenshot.

 

Due to this error message, I started to try "On_Timestamp" to convert from a string to a date.

{BCE66615-209E-4F5A-97DC-24C8C17282FB}.png


  • Level 8
  • November 22, 2021

somehow it looks like the date columns have been converted to string, have you tried to see the table configuration in the Data extraction job, there is possible to see the current configuration of the table under "column configuration"


gabriel.okaba11
Celonaut
Forum|alt.badge.img+2

can you check the data type during the extraction? Go to the selected AFKO table and look at the data type from GSTRI and GETRI. It can be that it has been extracted as string.

If you uploaded directly via flat file, you can open any transformation and run the following query

 

SELECT * FROM INFORMATION_SCHEMA.COLUMNS

WHERE TABLE_NAME = 'AFKO';

 

This should show you the data type from all columns from AFKO