473,769 Members | 2,220 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Equivalent of Oracle's to_date('03/04/2005','MM/DD/YYYY')

Assuming data is being stored in a DB2 TIMESTAMP

what is the equivalent of Oracle's to_date function :

to_date('03/04/2005','MM/DD/YYYY')

It's OK if MM/DD/YYYY is the only supported format.

Thanks.

Nov 12 '05 #1
2 18387

<gi************ *******@yahoo.c om> wrote in message
news:11******** *************@z 14g2000cwz.goog legroups.com...
Assuming data is being stored in a DB2 TIMESTAMP

what is the equivalent of Oracle's to_date function :

to_date('03/04/2005','MM/DD/YYYY')

It's OK if MM/DD/YYYY is the only supported format.

Thanks.

What does the Oracle to_date function do? Remember, we're mostly DB2 users
here. Although there are some people that know DB2 *and* Oracle, many of us
don't know Oracle at all. However, we *can* find things in the DB2 manuals
fairly easily, such as descriptions of functions. If you give us a short
description of what 'to_date()' does, we can point you to the closest DB2
equivalent(s).

It would also help if you mentioned which operating system and version of
DB2 you are using; the functions available on each OS are largely the same,
especially in the current versions of DB2, but if you are using older
versions, some functions that we might want to suggest may not be available
in that version.

Rhino
Nov 12 '05 #2
Hi Rhino,

Thanks very much for your response and the tips.

The answer to my question (the equivalent of
to_date('03/04/2006','MM/DD/YYYY') )

ended up being :

timestamp(date( '03/04/2005','00.00.00 '))

In other words, I needed to get a MM/DD/YYYY formatted
date into a TIMESTAMP field.

Nov 12 '05 #3

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

Similar topics

2
12645
by: Barry Young | last post by:
I am using the following code to insert a row in an Oracle Database. strConnection = "Provider=OraOLEDB.Oracle;Data Source=MYDATABASE;User Id=SYSTEM;Password=******" Dim strMessage As String Dim objConnection As New OleDb.OleDbConnection(strConnection) Dim objCommand As OleDb.OleDbCommand
3
3984
by: jhweb | last post by:
I am trying to query a table in oracle from Access 2000 using the following criteria. select * from table1 where DATE_RECEIVED between '1/jan/2003' and '30/jun/2003' I am using the Oracle odbc driver. Records should be returned but nothing.
1
10391
by: Paul Long | last post by:
Hi, I'm having a nightmare when trying to insert records into an Oracle database that contain dates. I've believe I should be using the to_date() function but I continually get the error: "ORA-01858: a non-numeric character was found where a numeric was expected" I'm reading from a text file and the datetime values are as follows:
7
682758
by: vnl | last post by:
I'm trying to run a SQL query but can't find any records when trying to select a certain date. Here's the sql: SELECT field 1, field2, date_and_time, FROM table1 WHERE date_and_time = '01-SEP-02' I'm getting no results. The date_and_time field is formatted like this: 2002-SEP-02 00:01:04
6
36938
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 size? Is there anyway to force pro*c to format correctly without using to_char because with to_char i lose the ability to keep track of correct data type. Thanks
5
4613
by: gane kol | last post by:
Hi when i try to use to_date function in C# codebehind, i am getting to_date doesnt exist in class or namespace error. i am trying to use something similar to INSERT INTO OracleTypesTable VALUES ( 'test', 2, to_date('2000-01-11 12:54:01','yyyy-mm-dd hh24:mi:ss'), '0001020304' )"; ref link:
5
6529
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 text file that are not compatible with oracle. The format looks like: 01/01/2006 and I need it to look like 01-JAN-2006. I have tried using the format function and the variable still shows it
24
4166
by: clinttoris | last post by:
Could some please finish this line of code. For the life of me whatever I try it does not work. I am trying to insert the current date time into oracle. Now I know that in oracle if I run select to_char(sysdate, 'dd/mm/yy hh24:mi:ss') from dual result would be 15/06/06 14:49:35
0
1236
by: rohitpk | last post by:
Hello all, can anyone conver the following ORACLE query to MySQl equivalent query, $account_fields = $this->oracle("SELECT ROUND(SUM(TO_DATE(PAID_DATE) - TO_DATE(INVOICE_DATE))/COUNT(*)) AS AVGDAYS FROM INVO WHERE BILLTO_ABRV = '$focus->kp_code_c' AND IS_PAID = 'Y' AND STATUS <> 'Void' AND PAID_DATE > to_date('$smoago 00:00:00','yyyy-mm�dd hh24:mi:ss')");
0
9422
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10206
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9984
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9851
tracyyun
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8863
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7403
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5293
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5441
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3556
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.