Welcome! Log In Create A New Profile

Advanced

WB22 - Date Pictures

Posted by André Labuschagné 
André Labuschagné
WB22 - Date Pictures
August 04, 2018 10:50PM
Hi All

Is there a function to change a month number to a month string equivalent such as month 8 must return Aug or August

Cheers
André
GuenterP
Re: WB22 - Date Pictures
August 05, 2018 06:47AM
Hi, MonthNumberinAlpha(..) should do it. It returns the month name that you defined in the project description ... long time before fuctions like this were available, in the project code we prepared arrays with long and short day and month names in the language the application was made for. Lots of Wx-functions are there for convenience not out of necessity ...

Monat[1] = "Jänner"; Monat[2] = "Februar"; Monat[3] = "März"; Monat[4] = "April"; Monat[5] = "Mai"; Monat[6] = "Juni"
Monat[7] = "Juli"; Monat[8] = "August"; Monat[9] = "September"; Monat[10] = "Oktober"; Monat[11] = "November"; Monat[12] = "Dezember"

Monatkurz[1] = "JAN"; Monatkurz[2] = "FEB"; Monatkurz[3] = "MAR"; Monatkurz[4] = "APR"; Monatkurz[5] = "MAI"; Monatkurz[6] = "JUN"
Monatkurz[7] = "JUL"; Monatkurz[8] = "AUG"; Monatkurz[9] = "SEP"; Monatkurz[10] = "OKT"; Monatkurz[11] = "NOV"; Monatkurz[12] = "DEZ"

Wochentag[1] = "Montag"; Wochentag[2] = "Dienstag"; Wochentag[3] = "Mittwoch"; Wochentag[4] = "Donnerstag"; Wochentag[5] = "Freitag"
Wochentag[6] = "Samstag"; Wochentag[7] = "Sonntag"; Wochentag[8] = "Reserve 1"; Wochentag[9] = "Reserve 2"

Wochentagkurz[1] = "MO"
Wochentagkurz[2] = "DI"; Wochentagkurz[3] = "MI"; Wochentagkurz[4] = "DO"; Wochentagkurz[5] = "FR"
Wochentagkurz[6] = "SA"; Wochentagkurz[7] = "SO"; Wochentagkurz[8] = "R1"; Wochentagkurz[9] = "R2"



Edited 2 time(s). Last edit at 08/05/2018 06:48AM by GuenterP.
André Labuschagné: WB22 - Date Pictures
September 09, 2018 09:40AM
Autor: André Labuschagné

Link zum Beitrag: [27130.foren.mysnip.de]

Thanks Guenter.
Piet van Zanten: WB22 - Date Pictures
September 09, 2018 09:41AM
Autor: Piet van Zanten

Link zum Beitrag: [27130.foren.mysnip.de]

Hi André,

Short for Guenters example:
ar_MyDays is array of string
ar_MyDays=["ma","di","wo"."etc"]

or
Constant
Days="ma,di,wo,do,vr.,za,zo"
END

myDay=extractstring(Days,",",3)

So many ways WX can get the job done :spos:

Kind regards,
Piet
André Labuschagné: WB22 - Date Pictures
September 09, 2018 09:42AM
Autor: André Labuschagné

Link zum Beitrag: [27130.foren.mysnip.de]

Thanks Piet - I did it the long way round. Going to give it a shot.
And yes - many ways with WX.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: