
strftime() and having month names as text
Hi,
I wanted to construct a variable with a date in Dutch like '23 oktober 2017'.
The expression strftime(now, "%d %B %Y") however, returns the month as 'October', so that didn't work for me.
Then I tried to get the month from an array, like:
var:array = ['januari','februari', 'maart', ... ]
var:array[int(month(now))]
From that, I learned that you cannot use a variable as an argument in array[]
I got by it with this, which may be of help to someone:
day(now) + '' + substring('januari februari maart april mei juni augustus september oktober november december ', int(month(now))*10-21,int(month(now))*10-11) + ' ' + year(now)
Hi,
I wanted to construct a variable with a date in Dutch like '23 oktober 2017'.
The expression strftime(now, "%d %B %Y") however, returns the month as 'October', so that didn't work for me.
Then I tried to get the month from an array, like:
var:array = ['januari','februari', 'maart', ... ]
var:array[int(month(now))]
From that, I learned that you cannot use a variable as an argument in array[]
I got by it with this, which may be of help to someone:
day(now) + '' + substring('januari februari maart april mei juni augustus september oktober november december ', int(month(now))*10-21,int(month(now))*10-11) + ' ' + year(now)
Login to reply