Reputation: 91
I am trying to convert the format of a date in xaml by below code but it reponse nothing. I am sharing my xaml code. Thanks in advance.
<Label HorizontalOptions="FillAndExpand" VerticalOptions="Center"
FontAttributes="Bold" FontSize="14" Grid.Row="0"
Grid.Column="1"
Text="{Binding SaleDate, StringFormat='{0:MMMM d, yyyy}'}"
Padding="-15,0,0,0"></Label>
Upvotes: 0
Views: 543
Reputation: 188
Your string format is wrong. Use this string format. this will convert DateTime to dd-mm-yyyy format
StringFormat='{00:dd-MM-yyyy}'
don't create converter if you can get solution on XAML itself
Upvotes: 1