 |
| ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5 |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

September 14th, 2006, 09:22 AM
|
|
Authorized User
|
|
Join Date: Aug 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
DateTime format quirks
Dear, All
I have very strange problem, I have the short date format on the system (Windows XP) set to the following: d/MMM/yyyy, so today will be viewed as: 14/Sep/2006.
but when I try to set the text in a textbox using the following statement: TextBox1.Text = Today.ToShortDateString()
it displayed: 9/14/2006.
I don't need to say I try many formating variations, and I think there's something wrong on the system.
please any suggestions will be highly appreciated.
Thanks in advance :-)
Regards
Ahmad Mohsen
__________________
Ahmad Mohsen
|
|

September 14th, 2006, 10:37 AM
|
|
Wrox Author
|
|
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
|
|
Have you tried:
Now.ToString("dd/MMM/yyyy")
"The one language all programmers understand is profanity."
|
|

September 17th, 2006, 04:34 AM
|
|
Authorized User
|
|
Join Date: Aug 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Dear, Sir (dparsons)
You are from golden heaven :-), thank you so much..it did works.
but ispite it works, did it makes any sense that I set the System date settings to something and although I can't access this setting, is this a bug in Windows or Visual Studio or what..thanks in advance :-)
Regards
Ahmad Mohsen
|
|

September 17th, 2006, 12:37 PM
|
|
Wrox Author
|
|
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
|
|
What do you mean, access the DateTime format of your PC? Is your PC the web server?
--Stole this from a moderator
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
|
|

September 18th, 2006, 02:41 AM
|
|
Authorized User
|
|
Join Date: Aug 2006
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Dear, Sir
Forgive me, I don't get it :-)
as you must know, I speak English as my second language :-), so I can't decide are you angry with me or you just joke..of course I don't want to bother you by any means, I just need help.
anyway if I (unintentionally) annoy you, please accept my apologize.
Regards
Ahmad Mohsen
|
|

September 18th, 2006, 06:02 AM
|
|
Wrox Author
|
|
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
|
|
No, Im not angry. You said:
but ispite it works, did it makes any sense that I set the System date settings to something and although I can't access this setting
What I meant was, you set the datetime to dd/mmm/yyyy on your PC, is your PC the webserver of your application?
Also you may want to read up on Localization in .NET, it had a great deal to do with how dates and such are displayed.
--Stole this from a moderator
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
|
|
 |