Expand my Community achievements bar.

SOLVED

data loading activity

Avatar

Level 6

Hi Team, 

 

I'm utilizing a data loading function with a date column in the format dd-mm-yyyy. Although I've chosen the format as dd/mm/yyyy and set the separator to "-", it's returning zero results. Is there a method to convert the data to dd/mm/yyyy after the file is loaded? Please advise.

 

rvnth_0-1715950386117.png

 

Thank you in advance

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @rvnth ,

The below configuration in data loading activity for date column should work fine:

ParthaSarathy_0-1715958314531.png

Alternate solution:

Set the Data type as string in data loading activity

ParthaSarathy_1-1715958366201.png

And add an enrichment activity next to data loading activity and create a column using below expression,

 

ToDate((Substring(Date_Field,4 ,2 )+'/'+Substring(Date_Field,1,2 )+'/'+Substring(Date_Field,7,4 )))

 

This will convert it to date data type. To convert it to date and time format use ToDateTime(****)

 

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @rvnth ,

The below configuration in data loading activity for date column should work fine:

ParthaSarathy_0-1715958314531.png

Alternate solution:

Set the Data type as string in data loading activity

ParthaSarathy_1-1715958366201.png

And add an enrichment activity next to data loading activity and create a column using below expression,

 

ToDate((Substring(Date_Field,4 ,2 )+'/'+Substring(Date_Field,1,2 )+'/'+Substring(Date_Field,7,4 )))

 

This will convert it to date data type. To convert it to date and time format use ToDateTime(****)