I have ListView
with DateTime
field which displaying 00:00:00
on Label
, that is not required at all.
public DateTime? StartDate
{
get { return _startDate; }
set
{
SetProperty(ref _startDate, value);
//StartDate = DateTime.ParseExact(StartDate.ToString(), "dd/MM/yyyy", CultureInfo.InvariantCulture); NOT WORKING
}
}
I tried to remove it using below line but not working
StartDate = DateTime.ParseExact(StartDate.ToString(), "dd/MM/yyyy", CultureInfo.InvariantCulture); //NOT WORKING
The code displaying it
<StackLayout Orientation="Horizontal">
<Label HorizontalOptions="Center" VerticalOptions="Center" Text="{Binding StartDate}" />
<Label HorizontalOptions="Center" VerticalOptions="Center" Text="To" />
<Label HorizontalOptions="Center" VerticalOptions="Center" Text="{Binding EndDate}" />
</StackLayout>
ListCell:
How can I remove 0's from date: