473,467 Members | 1,860 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Which function has TOTAL equivalent to Oracle's TO_CHAR?

1 New Member
The Oracle function TO_CHAT accept DATE datatype. In DB2, i know that exist the VARCHAR_FORMAT function (synonym TO_CHAR), but this function only accepts TIMESTAMP datatypes.
How can i have the same result in DB2, like this SQL in Oracle:
SELECT to_char(data_entrada,'YYYYMM') FROM t1

Obs: data_entrada is of datatype DATE.

Thanks,
Wellerson
Aug 12 '09 #1
1 3833
vijay2082
112 New Member
upgarde to db2 udb V 9.7 or create the to_char equivalent in earlier udb database as in oracle database.

http://www.ibm.com/developerworks/da...dm-0712gosavi/

Regards

Vijay
Aug 12 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Philippe LAVIGERIE | last post by:
What's wrong with my sample ? SQL> select * from v$version; BANNER ---------------------------------------------------------------- Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production...
1
by: JBBHF | last post by:
Hi i'm working on a web project, and i would like to make my oracle query work in mysql. select match.numero "nummatch", to_char(match.datematch, 'yyyy-MM-dd') "datematch", p1.numjoueur "j1",...
0
by: Error while executing SP | last post by:
Hi, I am getting "Unspecified error" using(System.Data.OleDb.OleDbConnection cn = new System.Data.OleDb.OleDbConnection()) {...
4
by: gimme_this_gimme_that | last post by:
What is the DB2 equivalent syntax of Oracle's : select to_char(created_date,'MM/DD/YYYY') from foo Thanks
14
by: Najib Abi Fadel | last post by:
Hi, i am using PostgreSQL 7.3.2 there's a bug for the date '2005-03-27' !!!!!!!!!!!!!!!!!!!!!!!!!!! SELECT to_char('2005-03-27'::date,'DD/MM/YYYY'); to_char ------------ 26/03/2005 (1 row)
24
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 ...
5
by: kalukum | last post by:
Hi Friend............. I am a oracle developer. I have a question, hope you would reply me.Thanks in advance for your time. I tried the following query : select c.cldt_status, ...
0
by: orausrture | last post by:
I am a newbie and really needs some assistance. I have struggled with this code. Any assistantance will be very appreciated. The code is below.... CREATE FUNCTION increment_serial_1 (p_serial_num...
0
by: iitt2007 | last post by:
Hi I am newbie. I need to translate the following Oracle script to SQL Server 2005 script. I will appreciate your help and feedback. Thanks a lot in advance. ...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
1
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,...
1
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.