DateToText() function

DateToText() function

  
Using the DateToText() function inside the action to convert the date to text which is stored in a local variable as #01/01/2015 00:00:00#,
and using the function to convert it in to the text as 2015-01-01
DateToText(CurrentDate)
But in the output screen it shows the text as 01/01/2015. When I am debugging also it shows the same.

so what is your question exactly?

 according to the help:  
The DateToText function is a built-in function that converts Date d to a text value in the format specified in the environment configuration (by default, YYYY-MM-DD).

so, what is your environment configuration?

furthermore, if you want full control, use the formatDatetime from the Text-lib.


Hi v,

What is the output you are expecting?
J, the help of the function itself (inside Service Studio) still displays the conversion as being to "yyyy-mm-dd" only (wrongly, it seems). This must've been a breaking change in some recent version?


J. wrote:
so what is your question exactly?

 according to the help:  
The DateToText function is a built-in function that converts Date d to a text value in the format specified in the environment configuration (by default, YYYY-MM-DD).

so, what is your environment configuration?

furthermore, if you want full control, use the formatDatetime from the Text-lib.

 
 When using the function DateToText() it is not converting in to the yyyy-mm-dd format. It just shows as yyyy/mm/dd format.

 
@Killian could be, but I am still wondering what the issue exactly is?
if the environment is setup to 01/01/2015 or not


@V I have no clue which question you have answered.
I understand the function is not working as expected in your case..

I also gave you a different solution..Format_DateTime in the Text.xif