Getting the month from a date and convert it to my own language

Hi,

I am finding a way to convert the clarion month from english to dutch. The day of the weeks I did by the choose function, in what manner can I do this with month names like october to oktober (dutch)

Thanks!

Create a procedure that returns what you need, something like this:

MonthName  PROCEDURE(BYTE pMonth)  !- returns STRING
  CODE
  EXECUTE pMonth
    RETURN '!st month in Dutch'
    RETURN '2nd month in Dutch'
    RETURN '3rd month in Dutch'
and so on 12 times
  END

  RETURN 'Invalid month number'
1 Like

Hi,

I mean with the use of a real month in a date field. I want to return the full dutch date so ā€˜monday 12 may 2019ā€™ must become ā€˜maandag 12 mei 2019ā€™

Thanks

EasyDotNet has this feature (convert datetime to any culture), for example I choosed ā€œnlā€ culture in the demo app and see date in Dutch):

2 Likes

Here is the date time 12.05.2019 20:29:20 (by the way 12.05.2019 is not a Monday)

2 Likes

What is returned when you use @d17 or @d18 formatting on a date field?

Hi I am getting now the english month names. I figured out how to get the week days in Dutch with Weekdag=CHOOSE(Pri:Datum_eerste_les % 7 + 1,ā€˜zondagā€™,ā€˜maandagā€™,ā€˜dinsdagā€™,ā€˜woensdagā€™,ā€˜donderdagā€™,ā€˜vrijdagā€™,ā€˜zaterdagā€™)

Maand = CHOOSE(MONTH(Pri:Datum_eerste_les),ā€˜januariā€™,ā€˜februariā€™,ā€˜maartā€™,ā€˜aprilā€™,ā€˜meiā€™,ā€˜juniā€™,ā€˜juliā€™,ā€˜augustusā€™,ā€˜septemberā€™,ā€˜oktoberā€™,ā€˜novemberā€™,ā€˜decemberā€™)

2 Likes

Thanks! That did the trickā€¦ how simple :smiley:

I know Iā€™m late, but you have the CLAMON and CLAMONTHā€¦
Look for them on the help and also for LOCALEā€¦

1 Like