Convert a variable to date format

I want to convert a variable in date format using “/” or “-” How would this procedure be done?

For example:

  • From 03012023 to 01/03/2023
  • Or from 03012023 to 03-01-2023

Thank you!!

Hello @Jose_Miguel_Almonte, You can use the moment.js library for this. Please refer to this post for a comprehensive guide:

And please let me know if this works for you.

1 Like

Thanks, problem solved!

1 Like

Hi @Jose_Miguel_Almonte

It will be helpful if you can share the solution. Thanks in advance.

Kind Regards,
M. Hayyan Khan