String Format

Date and Time Picker for Xamarin allows you to use standard or custom date and time format strings through the SpinnerFormatString property. Depending on what format is set, the picker visualizes spinner controls with prepopulated values to be picked. This feature allows you to create a date picker, time picker or combination of both.

  • SpinnerFormatString(string): Defines the string format.

The available Standard Date and Time format strings that can be set to the SpinnerFormatString property are described in the table below:

Supported Standard Date and Time Format String
"g"
"d"
"dd"
"hh"
"HH"
"m"
"mm"
"M"
"MM"
"MMM"
"MMMM"
"s"
"ss"
"t"
"tt"
"y"
"yyy"
"yyyy"
"MM/dd/yyyy HH:mm"
"MM/dd/yyyy hh:mm tt"
"MM/dd/yyyy H:mm"
"MM/dd/yyyy HH:mm:ss"
"MMMM dd"
"HH:mm"
"hh:mm t"
"yyyy/MMM/dd"
"mm:HH"

You can set only short Standard Date and Time Format Strings to the DateTime Picker control.

See Also

In this article
Not finding the help you need? Improve this article