473,396 Members | 1,858 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Format Date from Oracle

I am populating a datagrid with a query from Oracle, one column is a
date field which I am populating thus:

<asp:BoundColumn DataField="DATE_SENT" HeaderText="DATE SENT">
<ItemStyle HorizontalAlign="Left"></ItemStyle>
</asp:BoundColumn>

The problem is that it displays as the Oracle default of date time
AM/PM where as I only want to see the date like 4/14/2006

How would I convert this? do I do it in the SQL or whilst populating
the datagrid and how?

Thanks in advance

Apr 14 '06 #1
2 1262
Add the following attribute to your BoundColumn

DataFormatString="{0:MM/dd/yyyy}"
--
( OHM ) - One Handed Man
AKA Terry Burns - http://TrainingOn.net
"AZNewsh" <gn@dana.ucc.nau.edu> wrote in message
news:11**********************@g10g2000cwb.googlegr oups.com...
I am populating a datagrid with a query from Oracle, one column is a
date field which I am populating thus:

<asp:BoundColumn DataField="DATE_SENT" HeaderText="DATE SENT">
<ItemStyle HorizontalAlign="Left"></ItemStyle>
</asp:BoundColumn>

The problem is that it displays as the Oracle default of date time
AM/PM where as I only want to see the date like 4/14/2006

How would I convert this? do I do it in the SQL or whilst populating
the datagrid and how?

Thanks in advance

Apr 14 '06 #2
Perfect! Thank you

Apr 14 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: chelleybabyger | last post by:
my database, sqlplus oracle, has a column ccexpiry, whch is set to date. In my form in asp, there will always be an error whenever i pass in a date that is not in the DD MMM YYYY which is the...
1
by: jt | last post by:
I posted this yesterday, but I am not seeing this out yet: I am having problems with updating a date field in a certain format. The data is stored in an Oracle database. The date is...
1
by: tamrakar | last post by:
Please let me know how I can Load a packed decimal date coming from a file from mainframe be loaded into a Oracle table date column? Any help will be appreciated. Thanks,
6
by: deadlocklegend | last post by:
Hi all, when i set a date field's type (12) to VARCHAR2 or STRING, I get the date (mm/dd/yyyy) correct, but I can never get the time which is always set to 00:00:00 even if i increase the buffer...
13
by: Roy | last post by:
Hi all, I'm creating a project that should always use this date format when displays the dates or create dates. The back end database is a SQL Server and I like to know what is the logical way...
5
by: carl.barrett | last post by:
Hi, I am writing to a text file the records in an access table that is to be loaded into an Oracle system. However, I have been told that the date fields in the records I have exported to the...
0
by: Jaye | last post by:
Hi. I was wondering if anyone knows how to convert dates in the SAS format into an Oracle date format without the use of third party software. I'd like to be able to run a procedure that would...
3
by: puruji | last post by:
while importing date field from excel to oracle using VB6 i got a problem in date format....they do no match...in excel it gives date in format mm/dd/yy but in oracle i need dd-mm-yyyy so? to do....
7
by: Rob Nicholson | last post by:
Not sure if this is a good place to post, but we're trying to reverse engineer an Oracle database which has two fields for date & time. They don't seem to be encoded using the standard Oracle...
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
Oralloy
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,...
0
jinu1996
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
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,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.