Replace from list

Hello everyone!

Recently i’ve been struggling with getting the following to work.
I am analysing documents in order to fill in that input into a PeopleSoft environment.
The problem is that the input is not well standardized. So I need to put the date in the right order. (dd/mm/yyyy). The only input I am left struggling with is the following example:
1st January 1994 or just 1 January 1994

I was thinking about creating a list that replaces January, February, March,… with 01,02,03. But I can’t figure out how to make it work.
To make it even harder, I need it in two languages… (French and Dutch)
Can somebody help me out?

Kind Regards


1 Like

You can use a dictionary instead and keep the string’s as key and the numeric values as value pair


Maybe like this?

Dim strMonthArr() As String = {“january”, “february”, “march”}
strMonthNr = (array.IndexOf(strMonthArr,“march”)+1).ToString(“00”)



Thank you, solved it this way!

1 Like

Just keep in mind the search is case sensitive :slight_smile:

1 Like

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