User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP.NET section within the Web Development category of DaniWeb, a massive community of 402,915 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,213 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP.NET advertiser: Lunarpages ASP Web Hosting
Views: 768 | Replies: 1 | Solved
Reply
Join Date: May 2008
Posts: 13
Reputation: vinaya is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
vinaya vinaya is offline Offline
Newbie Poster

Dataformatstring for dateTime

  #1  
Jun 12th, 2008
Hi.., all,

I need both date and time to be displayed in my grid view in the dd/MM HH:mm format. I used dataformatstring={0:dd/MM HH:mm} but its not giving wat i need. so please can u suggest what should i do to get my problem solved.

Thanks in advance.
Last edited by vinaya : Jun 12th, 2008 at 12:33 am.
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2007
Location: Somewhere between heaven and hell
Posts: 94
Reputation: Kusno is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 6
Kusno's Avatar
Kusno Kusno is offline Offline
Junior Poster in Training

Re: Dataformatstring for dateTime

  #2  
Jul 11th, 2008
Hi,

You forget to set this function :
"HtmlEncode= false"

<asp:BoundField dataField="TransactionDate" HeaderText="Trans. Date" SortExpression="TransactionDate" DataFormatString="{0:yyyy-MM-dd}" HtmlEncode="false"/>

Thanks,

Kusno.
NEVER NEVER NEVER GIVE UP
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb ASP.NET Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Other Threads in the ASP.NET Forum

All times are GMT -4. The time now is 4:04 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC