Language specific date format

GideonE

New Member
Absolute beginner here. I have searched, but cannot find a soulution. I am trying to display a date in a label in a specific lanuage.

In VB.NET I would use : Dim laasteskaalkaartjieLangDatum As String = laatsteskaalkaartjiedatum.ToString("dddd dd MMMM yyyy", CultureInfo.CreateSpecificCulture("af-ZA")).

How can I use this format in B4A? I do not want to change the locale entirely - only for a specific label.

Regards
 

Alexander Stolte

Expert
Licensed User
Longtime User
that should give you the current date in the device format.
B4X:
Log(DateUtils.TicksToString(DateTime.Now))
You need DateUtils, just check this library in the list.
Or if you want only the date:
B4X:
Log(DateTime.Date(DateTime.Now))
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…