Apologies in advance for the essay, but this is just one issue I’ve had using functions in Data Designer caused by lack of clarity in the documentation.
I am adding a formula field to a data design to convert a string field to a date field. The string field contains only dates written in the format “YYYY-MM-DD”. I am attempting to use the “To Date” function to change the data type. The documentation has only the following information on this function:
“To Date: This parameter returns any string data type field or value containing date into the Date format provided by the user.
Note: If the date format is not provided, the default value considered is yyyy-MM-dd.”
What the documentation does not explain is how this should actually be entered into the function as it appears in data designer. I enter the name of the field I wish to convert then it prompts for “Format of Date” - it looks like I should have options to select but there’s nothing there. See below:
I entered “dd-mm-yyyy” here (which I think is what I’m supposed to do?) and then it prompts for a default value. I assume that this is meant to be the value that is provided in the case that the field is empty for a particular row? In my case, I want this to be NULL.
What I get when running the preview of the output of the Transform, however, is every row having NULL as the output.
Can someone please explain what the proper way to achieve what I need here? Also, can the documentation can be updated to provide more detailed descriptions of exactly how all formula should be entered.