How to change date format into specific month

how to change date format into mm/dd/yyyy.
and how to change date into specific month.how to change them

Hi @anjani_priya

We can change the month or the format. But could you be more elaborate your query, I am not clear about it.

Hi @anjani_priya

Could you elaborate your query.

Regards

@anjani_priya

Changing Date Format to MM/dd/yyyy:

originalDate = DateTime.ParseExact(yourDateString, “yourOriginalDateFormat”, System.Globalization.CultureInfo.InvariantCulture)
formattedDate = originalDate.ToString(“MM/dd/yyyy”)

if the date is 2-12-2023 then date should be change as december

the date dd-mm-yyyy format should change as mm(january)

the date dd-mm-yyyy into mm(january)

Okay in that case you have to give like this to get 01 as January.
dd-MMMM-yyyy

DateTime.ParseExact(Input, "dd-MM-yyyy",System.Globalization.CultureInfo.InvariantCulture).Tostring("dd-MMMM-yyyy")

Hope it helps!!

Hi @anjani_priya
Try this

Input= "03-01-2023"
str_Date=  DateTime.ParseExact(Input,"dd-MM-yyyy",System.Globalization.CultureInfo.InvariantCulture).Tostring("MMMM")

str_Date is of DataType System.String.

Hope it helps!!
Regards

no not like that entire day should be change as just month
like 1-01-2023 to january

Okay @anjani_priya

Then you can use the below one,

DateTime.ParseExact(Input, "dd-MM-yyyy",System.Globalization.CultureInfo.InvariantCulture).Tostring("MMMM")

Hope you understand!!

should i keep this in assign for each because i have so many line items

should i keep this in foreach

Yes you can Input is the Variable. You can store the currentitem value in that variable and it will work @anjani_priya

how to write in for each
Capture88

what do you mean to write in the loop @anjani_priya

yes how to write in loop and in a particular columns(2) names date and acknowlegement

error
Capture88

Hi @anjani_priya

Could you share what query have you written.

Regards