从数据库到标签dd / mm / yy的绑定日期

我正在使用Xamarin.Forms,并且正在从SQLite.NET DB检索记录到ListView中。我已经使用了数据绑定;但是,我想以dd / mm / yy格式显示DateTime记录。

当前,Date1和Date2以mm / dd / yyyy 00:00:00显示日期。可以更改吗?

 <ListView x:Name="lstOrdersList">
                <ListView.ItemTemplate>
                    <DataTemplate>
                        <ViewCell>
                            <StackLayout Orientation="Horizontal" BackgroundColor="White" >
                                <StackLayout Padding="0,0" Orientation="Vertical" VerticalOptions="StartAndExpand" HorizontalOptions="StartAndExpand" >
                                    <StackLayout Orientation="Horizontal" BackgroundColor="White" >
                                    <Label Text = "{Binding Name}" FontSize="12" TextColor="Black"  />
                                    <Label Text = "{Binding DateIn}" FontSize="10" TextColor="Black"  />
                                    <Label Text = "{Binding DateOut}" FontSize="10" TextColor="Black"  />
                                    </StackLayout>
                                </StackLayout>
                            </StackLayout>
                        </ViewCell>
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>
cuiyun0123 回答:从数据库到标签dd / mm / yy的绑定日期

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3072699.html

大家都在问