ToString (DateValue)
Name | ToString (Date Value) |
Syntax | ToString (Date value) |
Purpose | To convert a date value into a string using default culture. |
Description | Returns a string that represents the specified date. If date is null, null is returned. |
Return Type | String |
Parameters | value [System.DateTime] – Date to be converted |
![](https://documentation.astera.com/~gitbook/image?url=https%3A%2F%2Fgithub.com%2Fastera-software%2FAstera_Data_Stack_v9%2Fblob%2Fmain%2F.gitbook%2Fassets%2F0%2520%2824%29.png&width=768&dpr=4&quality=100&sign=c66104bc&sv=1)
Example
In this example, we will pass a date value to the function transformation object using a Variables object.
Where,
value = 01/09/1994
![](https://documentation.astera.com/~gitbook/image?url=https%3A%2F%2Fgithub.com%2Fastera-software%2FAstera_Data_Stack_v9%2Fblob%2Fmain%2F.gitbook%2Fassets%2F1%2520%2825%29.png&width=768&dpr=4&quality=100&sign=225ecddc&sv=1)
![](https://documentation.astera.com/~gitbook/image?url=https%3A%2F%2Fgithub.com%2Fastera-software%2FAstera_Data_Stack_v9%2Fblob%2Fmain%2F.gitbook%2Fassets%2F2%2520%2825%29.png&width=768&dpr=4&quality=100&sign=c258e729&sv=1)
In the output window, you can see that our provided date value has been successfully parsed, indicating that the date has been converted into a string value.
![](https://documentation.astera.com/~gitbook/image?url=https%3A%2F%2Fgithub.com%2Fastera-software%2FAstera_Data_Stack_v9%2Fblob%2Fmain%2F.gitbook%2Fassets%2F3%2520%2816%29.png&width=768&dpr=4&quality=100&sign=79273754&sv=1)
This conversion is also evident if we map the output value to a destination file. As shown below, the data type for this value has been converted to string:
![](https://documentation.astera.com/~gitbook/image?url=https%3A%2F%2Fgithub.com%2Fastera-software%2FAstera_Data_Stack_v9%2Fblob%2Fmain%2F.gitbook%2Fassets%2F4%2520%282%29%2520%281%29%2520%281%29.png&width=768&dpr=4&quality=100&sign=79332c8c&sv=1)