Write full Date Format in Excel column

Hi,

I have this Date Column as shown below:

I want to change it to full sentence format as such:

So these are the months and how it should be written:
image

Can anyone help please?

Thanks!
UIPath_Excel_Scratch (1).xlsx (153.5 KB)

Hi @Yudhisteer_Chintaram1 !
Here is a suggestion: Date_conversion.xaml (9.7 KB)
Beware, there is a strange date format at the end. I took care of it in the code through Try Catch but I wanted to let you know if it’s a forbidden/forgotten date format:
image

1 Like

Thanks Am learning new things.

1 Like

Wow. Thanks a lot @Hiba_B .
It worked great!

1 Like

But wait…we have a 0 in front of a single digit. Can we not have it?
image

Like in the screenshot I provided above.

I know you always help me for regex problems. Maybe you can do something here? :slight_smile: @prasath_S

@Yudhisteer_Chintaram1 - this doesn’t require regex…

If you dd MMM yyyy or dd MMM yyyy to d MMM yyyy or d MMM yy

It is:

@Yudhisteer_Chintaram1 - d definitely won’t print 03 …only dd does …it may be the culture or the excel sheet…

Hi @Yudhisteer_Chintaram1 …I took your previous post and split & Convert(in one step) as shown below… Please check…

Invoke code…

dt.AsEnumerable().ToList().ForEach(Sub(row) row("Date")=datetime.ParseExact(system.text.RegularExpressions.Regex.Match(row("INV Date / BL Date").ToString,"[\d/]+$").value.Trim,"d/M/yyyy",System.Globalization.CultureInfo.InvariantCulture).ToString(“d MMM yyyy”))

Hope this helps…

2 Likes

Hi @Yudhisteer_Chintaram1 !
As @prasath17 is saying, it’s in the writing process that you need to change, so it’s here:

2 Likes

Perfect! :slight_smile:

Thanks man!! :slight_smile:

1 Like

Hi @Hiba_B ,

Just a quick question. What do we have to change to write the full Month?
That is, for now for “April” it is written “Apr”
But I want it to write “April” in full sentence?
Thanks!

Oh I thought that you wanted only 3 characters; in the last assign string_date, replace MMM by MMMMMMMMM (because september has 9 characters and is the longest one) and let us know, i did not try it so if it makes something strange then we will change its type

@Yudhisteer_Chintaram1 - Just MMMM should be fine… Please refer all the datatime formats here…

1 Like

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