Hi you all, I need to convert the following string (type text) into a en_

Hi you all,
I need to convert the following string (type text) into a en_US date format.
In a process I used a XOR for manage the locale of the initiator. If locale <> en_US i don't touch the string, but if the locale = en_US I need to convert all date in en format.

This is the array:
", , , , 26/06/13 12:04, 26/06/13 11:55, , , , , , , , "

I using this doforeach :
doforeach("pr_checkStringDateSpaceInArrayList",split(ri!date,", "))

and this Rule (pr_checkStringDateSpaceInArrayList) :
if(ri!date=" ",ri!date, datetext(userdatevalue(index(split(ri!date," "),1,"ERROR 1")),"MM/dd/yy")&" "&index(split(ri!date," "),2,"ERROR 2"))

The problem is that I use "26/06/13 12:04, 26/06/13 11:55" its works but with the previous array doesn't works.

Any suggestion for me?

Thanks a lot...

OriginalPostID-72276

OriginalPostID-72276

  Discussion posts and replies are publicly visible

Parents
  • Thanks you all.
    The final rule is:
    if(ri!date="",ri!date,mid(ri!date,4,2)&"/"&left(ri!date,2)&"/"&mid(ri!date,7,2)&" "&timevalue(time(mid(ri!date,10,2),mid(ri!date,13,2),"00")))

    I tested it and it works well if I use locale = en_US

    I check the locale by process and if the locale = en_US I apply this rule.

    This rule are called by a doforeach expression because I've this array:

    ", , , , 26/06/13 12:04, 26/06/13 11:55, , , , , , , "

    Thanks all for precious suggest
    Regards
Reply
  • Thanks you all.
    The final rule is:
    if(ri!date="",ri!date,mid(ri!date,4,2)&"/"&left(ri!date,2)&"/"&mid(ri!date,7,2)&" "&timevalue(time(mid(ri!date,10,2),mid(ri!date,13,2),"00")))

    I tested it and it works well if I use locale = en_US

    I check the locale by process and if the locale = en_US I apply this rule.

    This rule are called by a doforeach expression because I've this array:

    ", , , , 26/06/13 12:04, 26/06/13 11:55, , , , , , , "

    Thanks all for precious suggest
    Regards
Children
No Data