Date Field changes to YYYY-MM-DD format automatically

I have set up the date action to input date in to a web form. the date is written as and expression Today() however when the date is entered in to the form it converts it into YYYY-MM-DD format. How do i make this stick to the MM-DD-YYYY format that the form is expecting?
 

Attachments

  • Snag.png
    191.3 KB · Views: 123
I have set up the date action to input date in to a web form. the date is written as and expression Today() however when the date is entered in to the form it converts it into YYYY-MM-DD format. How do i make this stick to the MM-DD-YYYY format that the form is expecting?
Use FormatDate(Today(),"MM-dd-yyyy"))
 
That didnt help it still writes the same way YYYY-MM-DD What i have is FormatDate([Date Of Signing],"MM-dd-yyyy") Where [Date Of Signing] is the date in MM-DD-YYYY format coming from the form.
 

sivagelli

Well-Known Member
I have set up the date action to input date in to a web form. the date is written as and expression Today() however when the date is entered in to the form it converts it into YYYY-MM-DD format. How do i make this stick to the MM-DD-YYYY format that the form is expecting?
Is the form converting the date passed to a different format? What is the acceptable format in to the date field on the form?
 
Is the form converting the date passed to a different format? What is the acceptable format in to the date field on the form?

Yes the date is converted into YYYY-MM_DD format when it is sent from BluePrism to the form but when the form is saved it does give warning but when "next" is clicked it converts it to MM-DD-YYYY format again and proceeds.
@immortalsolitude
Try to use separate data Item for this date field and track the value , how it is showing in data item .
Share screen shot if issue still persists with above approach.

Yes the issue still persists, here's the screen shot

View attachment 1548428765006.png
 

sivagelli

Well-Known Member
Alright! I see it now. BP is getting you the date in yyyy mm dd format irrespective of the formating. Is it only in BP? Let's try this-
Can you store Today() with no format in to a Data Item?
Also, go to excel sheet and try =Now() in any cell.
 

anjali

New Member
Hi ,
You can use the below code to get the date in a required date format, in case none of the above is working . It will surely give the date as per your requirement
string GetDate= Convert.ToDateTime("<your-datetime").ToString("MM-DD-YYYY "); You can use the ToString function to pass the format that you want the object to take.

MM
 
Top