How to get date in "Jan 2021" format

How to get date in “Jan 2021” format
Date is in the form on 12/30/2021 12:12:12 format

Hi @PenIt-2021,

Your approach should be to

  1. First convert string to valid Date format using Date.ParseExact method. This allows you do parse custom input date strings.

  2. Then convert the resulting value of Date to month year by using .ToString("MMM yyyy")

DateString = "12/30/2021 12:12:12"

OutputDateFormat = Date.ParseExact(DateString.ToString.Trim,"MM/dd/yyyy HH:mm:ss", System.Globalization.CultureInfo.InvariantCulture).ToString("MMM yyyy")

Here is a workflow: MonthYearFormat.xaml (5.3 KB)

Thank you ! Worked perfectly

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