0

Problem: In a field called $Detailed Decription$ sometimes dateformat 08/09/2021 is enterd and this need to be converted to swedish format 2022-02-11

I'am going to use BMC Developer studio and make a filter but i cant find a fitting solution for it. Replacing it wont work (i think) becaus it need to have a value to replace it with.

Maby there can be a function that reads regex (\d{2})/(\d{1,2})/(\d{4}) but how can i convert it?

TylerH
  • 20,799
  • 66
  • 75
  • 101
Gnobius
  • 1
  • 2

2 Answers2

0

If it's sometimes - look at AR System User Preferencje form. Check certain user's locale and date time config. Also is important where the data comes from. Could be a browser setting or java script mod.

Mark
  • 273
  • 4
  • 13
0

1- Using Set fields action, copy the date value from Detailed Description to a Date/Time field (i.e. z1D_DateTime01).

2- Using Set fields action and Functions (MONTH, YEAR, DAY, HOUR, MINUTE, SECOND) you can parse the date/time and convert it to format you like.

Something like this:

SwedishDate = YEAR($z1D_DateTime01$) + "-" + MONTH($z1D_DateTime01$) + "-" + DAY($z1D_DateTime01$)

This will capture the parts of date and combine them with "-" in the middle and in the order you want.

  • Thanks, this looks promising. i´ll try to get this working. But one question. How do i pars out the date format from detailed descriptions? Detailed Description is filled with a lot of other text so i need to parse out the wrong date format and convert it to Swedish format and then have it injected again in to the same place in Detailed description – Gnobius Feb 17 '22 at 14:49