Start a new topic

RegEx to convert Month digit into full word

Hello,


I wonder if anyone can help.

I have a date format of dd/MM/YYYY, I found the solution to extract the day only, month only and so forth.

Now, I would like to go further with the RegEX. i.e, when the month is '02', I want it to translate into the full word 'February'.

Is this possible at all?


Many thanks,

Binta


Binta, in Omatic I've never heard of an output from one regex statement (i.e. get the month) as input to a lookup but maybe it's possible.  I would approach it from a bit of code


Import.Fields.GetByExcelName("whatever your full month name column is").Value=monthname(cint(mid(Import.Fields.GetByExcelName("whatever your numeric month column value is").Value,3,2)),FALSE)


With the above said, I would not actually do it in one line as shown.  I always perfer a more defensive style (ex. check that the month string actually converts to a number, the number is between 1 and 12, etc).


As always, I would be happy to do all of it for you if you will send me a copy of your profile and some test data.  Thanks, Dennis dennis@ladnierfamily.com





Hi Binta


It's been a few days so you've probably already figured this out, but just in case:


Since you've already converted to "02", you can just add a (non-regex) dictionary entry straight after - all the entries in the dictionary are processed in sequence; I've attached a screenshot but if Freshdesk eats it I'll add the dictionary entries as text later.


image


Best regards

Nick

Hi Nick,


Thank you for sharing. It is good that there is so many ways of tackling this.


Many thanks,

Binta



Login or Signup to post a comment