Converting a month to date

Hello,

I need help in converting a text containing month (ex. “April”) to date (ex. 04.01.2022 12:00:00 AM).

I basically have a field and all my users has already filled it with month in text format saying (“April” / “May” etc.) just need a way to convert that to another date field as I would like to add a new feature.

Thanks!

Hi there, @saeed.ghadban… one way you could go is to create an option set where the options are the months, and add an attribute to hold a month’s associated date. With that option set in place, you should be able to use it as a lookup to find a particular month and then store its associated attribute in a date field.

Hope this helps.

Best…
Mike

1 Like

Thanks @mikeloc ! great idea used it once and works perfectly, but my concern is that I already have more than 1000 entries done using the old system which is in a text field is there anyway you would recommend to convert them into dates ?

Sorry, I don’t understand… are you saying you want to convert a value in a text field in the database into a date in that same field? I’m guessing that’s not what you are saying, but if it is, you can’t do that. I would create a date field on the data type and put the date value in that field. If you don’t need the text value anymore, you could delete that field after you are done using the text values to populate the date field.

You’re exactly right @mikeloc , I want to move the date from the old text field into the new date field, is there anyway I can do it using a workflow to run on the whole 1000 entries ?

Thanks!

Ah, okay… I should have been able to figure out that’s what you meant. Yup, you can set up a backend workflow and then use the bulk feature on the App data tab to update the entries.

How can we do that, like what workflows should I use in the backend ? @mikeloc ? :grinning:

Thanks @mikeloc found a great plugin that can do it all without effort ! :heart_eyes:

Thanks man!

Cool… but I never use plugins when I can do it myself. Whatever works for ya!

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.