Options

Calcdate for Multilanguage in Cloud BC

julkifli33julkifli33 Member Posts: 1,073
Hi All,
I have customer in cloud bc.
some of users are using English, some are using Danish.
I have created some of the date using calcdate
e. g :
StartDate := Calcdate('-CY',Today);

if user select English language then no problem.
but if user select Danish, then it will show error message :
"Fejl: Der skal indgå en tidsenhed i datoformlen '-CY'.

Tidsenheder kan være: D,UD,U,M,K eller Å.
L, der betyder aktuelle tidsenhed baseret på dato, kan specificeres som et præfiks for tidsenheden.."

any idea how to resolve this?

Best Answer

  • Options
    ShaiHuludShaiHulud Member Posts: 228
    Answer ✓
    if you wrap your date expression is less-more signs, it will ignore locale settings and calculate the same for everyone. So, your code should be:
    StartDate := Calcdate('<-CY>',Today);
    
    See official documentation on it here

Answers

  • Options
    ShaiHuludShaiHulud Member Posts: 228
    Answer ✓
    if you wrap your date expression is less-more signs, it will ignore locale settings and calculate the same for everyone. So, your code should be:
    StartDate := Calcdate('<-CY>',Today);
    
    See official documentation on it here
  • Options
    julkifli33julkifli33 Member Posts: 1,073
    Hi @ShaiHulud thank you so much :)
Sign In or Register to comment.