Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB 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
 
Old November 4th, 2010, 09:08 PM
Registered User
 
Join Date: Jun 2010
Posts: 9
Thanks: 2
Thanked 0 Times in 0 Posts
Wink Wrong date format in DB

Hello all...

In the section "Configuring Columns or Fields of Data-bound Controls" on page 453, I get a wrong date format by the end of the TryItOut.

even after adding
Code:
HtmlEncodeFormatString="True"
to the BoundField for the CreateDateTime.
According to the book(figure 13-14-page 457), the date format should be 10/27/2010 8:11 PM.
What I get is 27-Oct-10 8:11 PM.

I double checked, and I'm quite sure I went by the book exactly.

Any suggestions? Or may be that's normal? but still it's not the same as in the boook..

Thanks...
Lustigon...
 
Old November 4th, 2010, 10:05 PM
Registered User
 
Join Date: Jun 2010
Posts: 9
Thanks: 2
Thanked 0 Times in 0 Posts
Default

Well, found a fix.

On Windows 7
---------------
control panel - Region and Language - a dialog opens - at the format tab in the Short date drop-down list, one should choose M/dd/yyyy.

That fixed it...
 
Old November 5th, 2010, 02:51 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi Lustigon,

Yes, your Windows settings are used in ASP.NET / VWD for regional settings such as dates, time and currency. There's no real need to change that format to follow along with the book. You just need to be aware of the differences. So, if your machine has a DD-MM-YYYY format and you enter a date in a text box, you should enter it in that format.

Other than that, things should work fine regardless the settings in Windows.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
date format differs, need to force format somehow patricolsson ASP.NET 2.0 Basics 1 December 3rd, 2009 12:53 AM
Convert date to JDEdwards date format snufse ASP.NET 2.0 Basics 1 March 24th, 2009 08:54 AM
Convert British format date to American format? fyr PHP How-To 0 December 19th, 2007 03:17 PM
How to give Date format while entering date Subuana Beginning VB 6 4 March 17th, 2006 07:25 AM
date format differs, need to force format somehow patricolsson HTML Code Clinic 2 January 12th, 2006 05:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.