Changing date format when typing into input dialogue activity

I want to type a date into an input dialogue activity in the format dd/mm/yyyy. As of now, Its taking in only mm/dd/yyyy

if your date is stored in variable of type DateTime then below code will work for you
your datevariabele.tostring(“mm/dd/yyyy”) this would work

@learie

It will take any format. Could you please show me scrrenshot input dialogue activity.

If i type date in dd/mm/yyyy format, its throwing an error.
image

image

hi @learie
input dialog activity will actually take the string that we enter like
in this format MM/dd/yyyy
and if you want to make use of this input in this format dd/MM/yyyy
we can do like this
–we will be getting the output from input dialog activity with a variable named out_text of type string in format “MM/dd/yyyy”
–now to use in this format “dd/MM/yyyy”, wherever wanted mention like this their input
Datetime.ParseExact(out_text,“MM/dd/yyyy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“dd/MM/yyyy”)

this will give u a string of format dd/MM/yyyy or even you can assign it to a variable

NOTE : You can even change the format you want here " (out_text,“MM/dd/yyyy”, " based on the format of out_text, they should same…and you can get in any format you want out here - atlast ToString(“dd/MM/yyyy”)

Datetime.ParseExact(out_text,“MM/dd/yyyy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“dd/MM/yyyy”)

Hi…Thank you very much for this input but I actually want to input date into the dialogue box in the “dd/MM/yyyy” format…is that possible?

yes of course it is possible buddy
input dialog activtiy will take any input that we type as a string, we will getting the string that we entered with a output variable from this activity…
we can make changes with that variable the format of the string we want later by using the suggested datetimeconversion
Cheers @learie

@learie

Please check attached workflow. This is what are you trying.

InputDialogue.xaml (6.0 KB)

Thank you very much…

1 Like

hi, I actually put the variable as datetime and not string…tats the problem i guess…anyways thank you…this really helped me.

1 Like

Fantastic buddy
Cheers @learie

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.