How to Get date only form designer with c#?

How can i extract date only from date and time component in form designer?

Can you please elaborate your question little more clearly.?

You want to get date alone from a date and time value?

my bad its from deserialized json

YourDate.ToString(“ddMMyyyy”)

Hi!

can you show me the sample input? you can achieve that by using many methods

Regards,
NaNi

image
getting this error tho thanks for the reply
cannot convert string to newtonsoft.json.formatting

FormForUser_Input.xaml (16.9 KB)

Looking into your flow. Meanwhile check this.

1 Like

Can you share a screenshot of your code?
Activity is missing my version
image

Hi!

check this out!

Regards,
NaNi

Hi,

Can you try the following expression?

DateTime.Parse(Output["sdate"].ToString()).ToString("ddMMyyyy")

Regards,

2 Likes

You are getting date as a string so first convert it to date type.
Ex:
CultureInfo culture = new CultureInfo(“en-US”);
DateTime tempDate = Convert.ToDateTime(“1/1/2021 12:10:15 PM”, culture);

If you are still facing issue I can create sample flow for you. Thank you.

1 Like

It works thanks alot for helping out

1 Like

My bad i was trying to format straight away instead of converting it thanks alot for helping

1 Like

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