Hello,
I have a date in a SQL Database and want to use the dateformat tools to
format the output. I am now using the Month, Day, and Year to do it now.
I want to change:
Released Date: <%#Month(DataBinder.Eval(Container.DataItem, "ProdDate"))
& "/" & Day(DataBinder.Eval(Container.DataItem, "ProdDate")) & "/" &
Year(DataBinder.Eval(Container.DataItem, "ProdDate")) %><BR><BR>
To:
Released Date: <%#DataBinder.Eval(Container.DataItem,
"ProdDate").ToString("d")%><BR><BR>
But I get an error.
Any help would be great!!!
Thanks for you time and help,
Jack 2 20618
Jack,
I haven't tested this code but it will look something like this:
<%#String.Format("d", DataBinder.Eval(Container.DataItem,
"ProdDate").ToString)%>
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
"jack" <ja**@mrolinux.com> wrote in message
news:uR**************@TK2MSFTNGP10.phx.gbl... Hello,
I have a date in a SQL Database and want to use the dateformat tools to format the output. I am now using the Month, Day, and Year to do it now.
I want to change:
Released Date: <%#Month(DataBinder.Eval(Container.DataItem,
"ProdDate")) & "/" & Day(DataBinder.Eval(Container.DataItem, "ProdDate")) & "/" & Year(DataBinder.Eval(Container.DataItem, "ProdDate")) %><BR><BR>
To:
Released Date: <%#DataBinder.Eval(Container.DataItem, "ProdDate").ToString("d")%><BR><BR>
But I get an error.
Any help would be great!!!
Thanks for you time and help,
Jack
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Michelle Keys |
last post by:
Subject: DataBinder.Eval Error!
Server Error in '/MSPOS' Application.
------------------------------------------------------------------------
--------
DataBinder.Eval:...
|
by: A Ratcliffe |
last post by:
Although at the moment, I have a couple of large classic ASP projects on the
go, when I need to take a break, I'm experimenting with ASP.NET (with both
VB.NET and C#).
I notice that most...
|
by: bg |
last post by:
Hi!
How do I check if "date" exists before using that code?
I've built a RSSreader and sometimes there's a date in it and sometimes not.
How can I check if it exists to avoid crash...
|
by: Charlie |
last post by:
Hi:
Is it possible to apply formatting to above statements which insert field
values into HTML when binding to a datasource using Repeater control? For
example, I would like to trim trailing...
|
by: darrel |
last post by:
I'm binding fileinformation to a repeater and attempting to display the
'lastWriteTime' property as a formatted date.
This:
<%# DataBinder.Eval(Container.DataItem, "LastWriteTime" %>
Gives...
|
by: Wayne Wengert |
last post by:
I have an aspx page in which I retrieve data from an SQL Server. At one
point I am retrieving a smalldatetime field and I want to display only
"mm/dd/yy" but the default seems to be to add the...
|
by: Oleg Ogurok |
last post by:
Hi all,
I have a DatePicker ASP.NET control that allows users to enter date (e.g. a
calendar control). The control has the following property
public DateTime Value { get; set; }
I've placed...
|
by: CharlesA |
last post by:
a general question...
I'm a bit mystified by Databinder.eval(object, Colname, )
if controls can be bound to their individual data sources within the load
event of the page...
why would we ever...
|
by: WT |
last post by:
Hello,
I have a usercontrol loaded in a page with a theme.
This usercontrol contains columns template with hyperlinks, with skinID.
The columns are not displayed, seems thta there is some...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |