Wrox Programmer Forums
|
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics 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 April 10th, 2006, 12:17 AM
Registered User
 
Join Date: Nov 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to tanakrita Send a message via Yahoo to tanakrita
Default Datagrid / DateTime Format Setting

Hello,

Could anyone suggest me how to set the Datetime format when we bind the data from Ms.Access file to Datagrid control ?

Thank you for your kind teachings!
Tanakrit

Tanakrit A.
 
Old April 19th, 2006, 12:21 AM
Authorized User
 
Join Date: Mar 2006
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

if you are using bound columns try following option:

goto property builder - columns

Select the date column you want to format. Set Data Formating Expression as {0:d} for short date format and {0:D} for long date format.

For more details about formatting expression refer to MSDN


 
Old May 17th, 2007, 09:56 PM
Friend of Wrox
 
Join Date: Oct 2003
Posts: 336
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to alyeng2000
Default

also be sure
to set HtmlEncode="False" to the BoundField

Ahmed Ali
Software Developer





Similar Threads
Thread Thread Starter Forum Replies Last Post
XSL DateTime format for Excel fmoon606 XSLT 8 May 23rd, 2008 05:35 PM
Convert DateTime Format dnyanubhamare C# 2005 2 February 25th, 2008 09:06 AM
hi! datetime format question.. xkorakidis JSP Basics 0 January 10th, 2008 06:17 AM
Format datetime deb1980 ASP.NET 2.0 Basics 7 April 17th, 2007 12:35 AM
DateTime format quirks ADMystery ASP.NET 1.0 and 1.1 Professional 5 September 18th, 2006 06:02 AM





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