VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,756 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I want to format the time DateTimePicker to 24 hours.
I used the following code and the time is actually changed to 24 hours. The problem now is that the date format takes an undesirable shape when using an Arabic region for the device or an English region. I want the direction of the date to not change no matter how different the region of the device.
I want the direction of the date to be an hour and a minute and am pm as in the picture, regardless of the time zone
If Thread.CurrentThread.CurrentCulture.DisplayName.Contains("arab".ToLower) Then
ROSYUPDATE_F.DateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom
ROSYUPDATE_F.DateTimePicker.CustomFormat = "HH:mm tt"
Else
ROSYUPDATE_F.DateTimePicker.Format = System.Windows.Forms.DateTimePickerFormat.Custom
ROSYUPDATE_F.DateTimePicker.CustomFormat = " tt mm:HH"
End If
Animation that changes the time from the desired format