Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Databinder.Eval format time

Posted on 2011-10-21
3
Medium Priority
?
1,294 Views
Last Modified: 2012-05-12
Can anyone tell me why the following format string is not working on a SQL field of DateTime when the value of the column is; 23/08/2011 08:00:00

???


<%#DataBinder.Eval(Container.DataItem, "StartTime", "{0:HH:mm}")%>

Open in new window

0
Comment
Question by:swgdesign
  • 2
3 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
ID: 37005954
Do you only want to show time?

Try


<%#DataBinder.Eval(Container.DataItem, "StartTime", "{HH:mm}")%>
0
 

Accepted Solution

by:
swgdesign earned 0 total points
ID: 37016454
I 'overlooked' the sql column thinking it was datetime when infact it was a string!
0
 

Author Closing Comment

by:swgdesign
ID: 37043540
i solved the solution myself by chaning the sql column type to datetime, instead of nvarchar
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Screencast - Getting to Know the Pipeline
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

580 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