473,770 Members | 5,136 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataFormatStrin g on Gridview issue

DataFormatStrin g="{0:d}" for my boundcolumn should format my datetime datatype
as xx/xx/xxx instead of xx/xx/xxxx xx:xx:xxAM
only trouble is...it doesnt change the format of my DateTime field coming in.

Help?
Jul 25 '06 #1
2 1089
Tom
HTMLEncode = false

"Sean" wrote:
DataFormatStrin g="{0:d}" for my boundcolumn should format my datetime datatype
as xx/xx/xxx instead of xx/xx/xxxx xx:xx:xxAM
only trouble is...it doesnt change the format of my DateTime field coming in.

Help?
Jul 25 '06 #2
SWEET!

works perfectly

"Tom" wrote:
HTMLEncode = false

"Sean" wrote:
DataFormatStrin g="{0:d}" for my boundcolumn should format my datetime datatype
as xx/xx/xxx instead of xx/xx/xxxx xx:xx:xxAM
only trouble is...it doesnt change the format of my DateTime field coming in.

Help?
Jul 25 '06 #3

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

Similar topics

3
1620
by: Gerhard Pretorius | last post by:
Since installing the VS.NET August CTP the DataFormatString of the BoundField in the Gridview does not work. Runtime v2.0.50727. <asp:BoundField DataField="Event_Date" DataFormatString="{0:yyyy/MM/dd}" It still shows the date as "2005/05/03 12:45 AM" It worked in beta 2, don't knwo about July CTP, but August CTP is a problem v2.0.50727
1
2006
by: Gerhard Pretorius | last post by:
I am reposting this..hoping someone (from Microsoft) can confirm this at least as a problem: Since installing the VS.NET August CTP the DataFormatString of the BoundField in the Gridview and Details view does not work. Runtime v2.0.50727. <asp:BoundField DataField="Event_Date" DataFormatString="{0:#0.0}" It still shows the value as 23.04
2
10741
by: Jon | last post by:
Hi All, I have a column in my GridView with DataFormatString="{0:dd/MM/YYYY HH:mm}" HtmlEncode="False" Still the date formats as 2005-11-08T20:48:03 Any ideas? I'm using latest full release of Framework 2.0 Thanks
1
6638
by: Hardy Wang | last post by:
Hi, I have a GridView control in my web form (ASP.NET 2.0) <asp:GridView ID="gvReport" runat="server" AllowSorting="True" AutoGenerateColumns="False" Width="100%"> <HeaderStyle CssClass="ItemCaption" /> <RowStyle CssClass="Line" /> <AlternatingRowStyle CssClass="AltLine" /> <Columns> <asp:BoundField DataField="ItemName" HeaderText="Item
12
6534
by: Alan Silver | last post by:
Hello, I have a GridView control, and am unsuccessfully trying to format a column to show costs. The (simplified) code is as follows... <asp:GridView ID="grdCustomers" DataSourceID="dtaCustomers" AutoGenerateColumns="false" runat="server"> <Columns> <asp:BoundField DataField="Total" DataFormatString="&pound;{0:F2}" /> </Columns>
2
16356
by: Rob Roberts | last post by:
I have a GridView that is bound to a collection of DateTimes (i.e. - Collection<DateTime>). I have a BoundField in the GridView, and its DataField is set to the DateTime's Date property, and the DataFormatString is set to "{0:d}" in order to display the date in short date format (without the time). But the DataFormatString doesn't seem to have any effect. The DateTime gets displayed with the time. I have another GridView that is bound...
4
8178
by: Eamonn | last post by:
Hi I am running Microsoft Visual Studio 2005 Team Edition Version 8.0.50727.42. I am adding columns to a GridView at runtime. When I add a BoundField that will contain DateTime data I want to format the date so I use: BoundField.DataFormatString = <myDateFormat> However it just displays the date formatting string in the GridView and not the formatted date. I tried setting the HtmlEncode value for the
2
2089
by: pgonzo | last post by:
In my initial tests with the GridView control, I cannot understand why the DataFormatString attribute has no affect on the column formatting. The 'creation_date' field is being reported as "3/30/02 14:23:28". I want to display it as "03/30/02". I've included the code below. Can anyone offer an explanation? <asp:SqlDataSource ID="DD_Issues" runat="server"
3
6717
by: bsm | last post by:
I have created GridView and assign Datasource at RunTime. I need to format one Column which will have the following data. Start_date Want to Format as Start_date -------------- ------------------------------------------ 10-Mar-2005 10:50:00 10-03-2005 Discard Time and change the Date Format.
5
6523
by: Tim Mackey | last post by:
hi, with a derived DataGrid control, i can override the CreateColumnSet method and scan into the DataGridColumns and set the DataFormatString, e.g. leave out the time part of a DateTime value. this works great for a DataGrid control. however i'm upgrading this control to inherit from GridView. there seems to be a limitation of the gridview "Method not supported" when you try and set a DataFormatString on an AutoGeneratedField.
0
9592
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10230
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10058
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9870
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8886
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5313
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5450
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3972
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3576
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.