Skip to main content
Solved

How Convert String to Date field in Rule Engine


How Convert String to Date field in Rule Engine when mapping fields to load into GS Object under rules action.

Best answer by phani_kumar

Hi @kshirsagar3 

Convert String field to Date is not possible and we don’t have an option in Rules Engine.

But we do have a work around which is, First Load your Source Data to S3 bucket through rules.

And create another new rule which will fetch the S3 file as a Source and once you click on “Load Column Details” the fields will appear and there we have a option to choose Datatype.

 

 

Click on drop arrow and select the data type as per your requirement.

 

Then in the Action part you will be able to Map that to a Date Datatype Field.

 

Thanks.

View original
Did you find this topic helpful?

3 replies

phani_kumar
Forum|alt.badge.img+3
  • Gainsight Employee ⭐️⭐️
  • 332 replies
  • Answer
  • June 4, 2021

Hi @kshirsagar3 

Convert String field to Date is not possible and we don’t have an option in Rules Engine.

But we do have a work around which is, First Load your Source Data to S3 bucket through rules.

And create another new rule which will fetch the S3 file as a Source and once you click on “Load Column Details” the fields will appear and there we have a option to choose Datatype.

 

 

Click on drop arrow and select the data type as per your requirement.

 

Then in the Action part you will be able to Map that to a Date Datatype Field.

 

Thanks.


  • Contributor ⭐️⭐️
  • 4 replies
  • June 4, 2021

Thanks @phani_kumar for the workaround approach. However, We are pulling the data from snowflake tables using data designer. We want to map Data Set read only table (Gainsight) fields to Gainsight Object using Rule.

Gainsight Readonly DataSet Object (Date-String) → Gainsight Object(Date-Date)

Any suggestions please ?

 

 


romihache
Forum|alt.badge.img+8
  • VIP ⭐️⭐️⭐️⭐️⭐️
  • 426 replies
  • March 3, 2022

Hi! I just had this same issue with DD, and the work around that I found is to bring from the s3 bucket another file with both date formats (the string one, and the expected date format output, is just a list from the minor date that I have until the eternity -say year 2200-) and I use a merge to bring that “correct date field” in, and that made the trick. In rules engine you can also add an aditional merge from another S3 dataset.

I’m not sure if that will help your case and I’m pretty noob with GS, but wanted to reply because your question was useful for me.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings