Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

sql2005 for xml raw sending untyped data to asp.net

Posted on 2010-09-01
1
Medium Priority
?
318 Views
Last Modified: 2012-05-10
i have sql that uses FOR XM RAW to generate xml for my asp.net application to use to bind grids to and things like this.

the problem is that the date data is not taking the gridView formatting of the date because (and im taking a crack at this) the date value in the xml is a string and the formatting is not taking.

any thoughts on how to get this to work?

i like using xml because i can persists it to a log table and trace all the xml sent in and out. i would hate to loose this...
0
Comment
Question by:realcoding
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
SrinathKomirishetty earned 2000 total points
ID: 33583734
Try this:
1.  Format the column within the rowdatabound event
DateTime d;  
int cellNo=2;
 if (DateTime.TryParse(e.Row.Cells(cellNo).Text,out d)) {  
     e.Row.Cells(cellNo).Text = d.ToString("MM/dd/yyyy");  
or
2. Label.Text='<%# Eval("DateField", "{0:M-dd-yyyy}") %>'
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question