Hi,
I display date in asp.net pages using user defined format: mydate.text=Format(dr("MyDate"), "MMM. d, yyyy"). It works fine for all pages except one.
In that page, I built a dataAdapter, filled a dataset and then I did:
If (ds.Tables("relo").Rows.Count > 0) Then
dr = ds.Tables("relo").Rows(0)
If (Not IsDBNull(dr("File Open Date"))) Then
initialdate.Text = Format(dr("File Open Date"), "MMM. d, yyyy")
End If
End If
When the page loads, it did not display the real date. Rather, it displayed MMM. d,yyyy for any real date.
There is nothing special on that page. One thing that might affect it is that later I bind the datatable to a repeater:
Repeater1.DataSource = ds.Tables("relo")
Repeater1.DataBind()
Would that be the problem?
Thanks! 2 1349
Sun,
What do you mean by 'any real date'?
Also, did you try to run the page without the formatting to check the dates
you have in the dateset?
Telmo Sampaio
"Sun" <Su*@discussions.microsoft.com> wrote in message
news:52**********************************@microsof t.com... Hi,
I display date in asp.net pages using user defined format:
mydate.text=Format(dr("MyDate"), "MMM. d, yyyy"). It works fine for all
pages except one. In that page, I built a dataAdapter, filled a dataset and then I did: If (ds.Tables("relo").Rows.Count > 0) Then dr = ds.Tables("relo").Rows(0) If (Not IsDBNull(dr("File Open Date"))) Then initialdate.Text = Format(dr("File Open Date"), "MMM.
d, yyyy") End If End If When the page loads, it did not display the real date. Rather, it
displayed MMM. d,yyyy for any real date. There is nothing special on that page. One thing that might affect it is
that later I bind the datatable to a repeater: Repeater1.DataSource = ds.Tables("relo") Repeater1.DataBind()
Would that be the problem?
Thanks!
Hi Sun,
You know this statement?
mydate.text=dr("MyDate").ToString("MM/dd/yyyy")
Assuming that date is a datetime column
Cor This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Jo |
last post by:
Is there anyway we can know using JavaScript the Short Date Format
used in the
Control Panel -> Regional and Language Settings?
I know the using the combinations of following we can get the...
|
by: Tatiana Zadiraka |
last post by:
I use DB2 8.1 with FixPack 5. In command line for sql I get all DATE
columns only in MM-DD-YYYY format. Of course, DATE('20-12-2003') gives
me an error
SQL0181N The string representation of a...
|
by: Dario Di Bella |
last post by:
Hi all,
we have the following urgent issue affecting our development team.
Initially we had one particular workstation that failed executing
queries on a DB2 database, raising an invalid date...
|
by: Tim Marsden |
last post by:
Hello,
I am building a parameterised query in vb.net for execution against a SQL
server database.
I am using a OLEDB command and OLEDB parameters. If one of the parameters is
a date I sometimes...
|
by: Coleen |
last post by:
Hi all :-)
I have a bit of code that chacks for the last day of the Month, and if it falls on a week-end, sets the due date to the Monday after...
I'm trying to get the date to go to the...
|
by: abcabcabc |
last post by:
I write an application which can let user define own date format to input,
How to convert the date string to date value with end-user defined date
format?
Example, User Defined Date Format as...
|
by: David Rysdam |
last post by:
I have a large amount of data that I copy in and out of Sybase very
often. Now I also want to copy this data in and out of postgres. I
have an existing script that creates the entire database(s)...
|
by: Piotr |
last post by:
Hi,
I have following problem:
I use a form in excel to send data into mysql server, everything is ok
unless I have to deal with decimals or data fields, this simple are not
recognized.
For...
|
by: andreas |
last post by:
When I copy a vb.net project using date formats from one PC with a windows
date format f.e. dd/mm/yyyy to another PC having a format yy/mm/dd then I
get errors.
How can I change for a while in the...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
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,...
|
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...
|
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...
|
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,...
| |