we have application which is accessed worldwide. and we set the default date format. The server set the time zone of the San Fransisco. Here the control used to display date in mm/dd/yyyy
<telerik:RadDatePicker Width="90" x:Name="dtpCashflowDate" Height="18" DateTimeText="{Binding Path=NewTransferDetail.TransferDate,Mode=TwoWay,ValidatesOnDataErrors=True,StringFormat=\{0:d\}}" InputMode="DatePicker">
<i:Interaction.Triggers>
<i:EventTrigger EventName="GotFocus">
<ei:CallMethodAction MethodName="NewRecord_GotFocus" TargetObject="{Binding}" ></ei:CallMethodAction>
</i:EventTrigger>
</i:Interaction.Triggers>
</telerik:RadDatePicker>
Now one of the organization office in Bangkok show the date in dd/mm/yyyy. How its possible.
With StringFormat=\{0:d\}
you set the control to show the short date pattern.
If your application is set in another culture the short date will change accordingly.
Please control which format you need in this microsoft article, then change the StringFormat
or the Culture
property in the way you need.
Remember: you can also set the format in all the istances of your application by specifying a custom format, regardless of the culture of your application, by setting StringFormat=\{0:mm/dd/yyyy\}
.