473,385 Members | 1,901 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Custom format in DateTimePicker

Got a dateTimePicker o

o.Format = DateTimePickerFormat.Custom;

o.CustomFormat = "MM/dd/yyyy hh:mm tt";

the previous code work well when the Regional option is set to english
Canadian but do not display the AM or PM when the Regional option is set to
french canadian
Nov 16 '05 #1
7 42950
Guy,

I am curious because in my opinion is the behaviour more than correct.

Is in French Canadian the PM and AM used and what does it than mean in the
French language?

You can use very terrible constructions by setting the culture of the UI in
the constructor. However, I find that terrible because that is not changeble
than in anyway and really is your application than fixed for one culture.
You have to do that for the base class as well when you inherit your forms.

Maybe this helps

Cor
Nov 16 '05 #2
doh,

I think I make a mistake, because I thought that for the DateTimePicker even
that changing in the constructor does not work.

Cor
Nov 16 '05 #3
ok - so what does AM / PM mean in any language other than latin ?

"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Guy,

I am curious because in my opinion is the behaviour more than correct.

Is in French Canadian the PM and AM used and what does it than mean in the
French language?

You can use very terrible constructions by setting the culture of the UI in the constructor. However, I find that terrible because that is not changeble than in anyway and really is your application than fixed for one culture.
You have to do that for the base class as well when you inherit your forms.
Maybe this helps

Cor

Nov 16 '05 #4
In fact, the interface of the software in working on, can be display in
french or English on a Click, and I made custom setting on the
datePicker to be sure, if the software is use in french the datePicker
will be in french, if the software is use in english the datePicker will
display date in english format.

When i try the code,
I put the regional setting in english
Software in engish display
the date picker display in english 12/01/2005 10:00 PM
software in french display
the date picker display in french 01-12-2005 22:00

I put the regional setting in french
Software in engish display
the date picker display in english 12/01/2005 10:00
software in french display
the date picker display in french 01-12-2005 22:00


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #5
Guy,

One word, it is not the English format.

That is the language, what you are using is the US or English Canada culture
for date and time and the standard French way for that.

In most English speaking countries is the English way of datetime used.

See this page from the BBC I think it cannot be more English than that.

http://www.bbc.co.uk/cgi-perl/whatso...i?MEDIUM=radio

I hope this helps

Cor
Nov 16 '05 #6
December the 31 2004 at 10:00 PM

Why in this case the display show
with string to custom format "MM/dd/yyyy hh:mm tt"
12/31/2004 10:00 PM regional setting in english
12/31/2004 10:00 regional setting in french

and "dd-MM-yyyy HH:mm"
31-12-2004 22:00 regional setting in english
31-12-2004 22:00 regional setting in french

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #7
Guy,

Because you did hard coded your format, in my opinion something nobody
should ever do.

But you can use the short words as in this case probably the best is the
standard ()
string st = dt.ToString()

See here the posibilities on that
http://msdn.microsoft.com/library/de...ringtopic4.asp

I hope this helps?

Cor
Nov 16 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Kolmi | last post by:
Has anyone come across a solution to this ? To format a value into an Sql Server sql string, I want to use the call Convert.ToString( value, new MyFormatProvider() ); Why I have to do this...
1
by: Jim Heavey | last post by:
Hello, I am trying to alter the default date format shown in the date picker control. I am using the "Custom Format" property and setting this value to "ddd M/d/yy", but this has no effect. What...
2
by: fred | last post by:
I am trying to Copy and paste using a custom format but I canot retrieve the data. In the main Form's class I have declared: Dim myDocmanFormat as DataFormats.Format then in the New Sub of...
0
by: msnews.Microsoft.com | last post by:
Hi , Not able to figure out the way to format numeric fields. Code snippet Dim ColStyle3 As New DataGridTextBoxColumn With ColStyle3
0
by: Mannfred | last post by:
I've written a complex web service in C# to be used by SmartDevices and I'm trying to reduce size of the message to the absolute minimum to save on cost, every byte counts etc. Is there any way...
2
by: Adam Right | last post by:
in gridview how can i custom format a decimal value for BoundField column ? i want to set 125.25000 ---125,25 5.20000 -->5,2 45.00000 --45 I am using DataFormatString="{0:#,#.##}" but...
2
by: KA NMC | last post by:
I've noticed something strange when using the code below with a DateTimePicker wondering anyone else noticed or knows why this happens Dim ws As String ws = "Not Available" ...
4
by: phpmagesh | last post by:
Hi, I have to show system date in custom format For example: 2009/Oct/06 I want to show date in above format. how to get this output . i used the below format
4
by: dougancil | last post by:
Is there anyway to custom format the DateTimePicker so that users can only select weekdays? Thank you, Doug
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.