Android Question How to display date in YYYY-MM-DD format using DateUtils function

beelze69

Active Member
Licensed User
Longtime User
Hi,

I intend to get the date in the format YYYY-MM-DD only.

In my B4a Code,

I use ,

DateTime.DateFormat="yyyy-MM-dd"
Log(DateUtils.TicksToString( DateUtils.SetDate( year,month,day)))

{Where year, month and day are all values that I pass through some function(say) }
However, the output that is displayed in the log for a date say 03rd February,2022

is 2022-02-03 00:00:00

How do I ensure that the Hour, Minute, Second is not shown ?


Thanks
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…