Convert Date Format from DDMMYY to DD/MMM/YYYY
Hi,
Thanks in Advance.
Is there any function Module to Conver the Given Date in the given Below Format.
DD / MMM / YYYY
For Example if the given date is 16072009 then it should print as 16 / JUL / 2009
Regards:
Sridhar.J
hi
use the below code it may help u
PARAMETERS: p_date TYPE d.
DATA: datestring TYPE char11, l2 TYPE T247-KTX.
CALL FUNCTION 'ISP_GET_MONTH_NAME'
EXPORTING
date = p_date
language = 'E'
month_number = '00'
IMPORTING
shorttext = l2 .
IF sy-subrc <> 0.
CONCATENATE p_date6(2) '/' l2 '/' p_date0(4) INTO datestring.
WRITE: datestring .
surya reddy
Similar Messages
-
Convert Date format from YYYYMMDD to MM/DD/YYYY --issue with Mapping
Hi All ,
I have IDOC(DESADV.DELVRY03-> file ) scenario which i am working on . While debugging noticed that the field :
E1EDT13\NATNZ -Data Transformation(from yyyymmdd to mm/dd/yyyy)-Target .This works
But say if IDOC doesn't pass any value (For Good's issue) I get Error during debugging : RuntimeException in Message-Mapping transformation: Unparseable date: ""
I did check thsi blog : Convertinf Date format from YYYY-MM-DD to MMDDYYYY but this is about the Data Transformtaion.
I tried using constants , create if , -these function doesn't work /not applicle in this case
Could you please provide inputs as to how to handle two condition :
1. With date -- then transform
2.Else , pass nothingHi Varalakshmi,
Plese try to use UDF for date conversion and include logic which would check the Space value from the source structure.
so if there is space return as such
else.
perform the conversion logic.
Convertinf Date format from YYYY-MM-DD to MMDDYYYY
(The conversion logic has been provided by micheal in the thread you have provided in the query)
Thanks,
Ram. -
Function module to convert date format from yyyymmdd to mmddyyyy format
function module to convert date format from yyyymmdd to mmddyyyy format
Hi Rajitha,
Do like this
Data: Var1 type sy-datum,
var2(8) type c.
var1 = sy-datum.
Concatanate var1+4(2) var1+6(2) var1+0(4) into var2.
write var2.
Reward Points if this helps,
Satish -
Converting date format from in mapping
hi xi friends.
in my scenario i just want to convert date format from 12022007 which is file to 12.02.2007 which is in target bapi.
waiting for u.
bye.
regards.
seeta ram.Hi,
if I understood you correctly you want to transform from ddMMyyyy (your format in the external file) to yyyyMMdd (format of ABAP datatype DATS):
Then all you need to do is to use the standard function TransformDate (as already described above).
Enter in the field "Format of source Date": ddMMyyyy
Enter in the field "Target Format": yyyyMMdd
That's it.
Regards,
Helmut -
Converting date format from 14/07/08 to 14-jul-08
hi all ,
i want to convert date format from 14/07/08 to 14-jul-08 . is there any function module for this ?.
kindly reply.
regards,
siyaHi Siva,
Check the code below.
For getting date format in the form like 10.Dec.2008*
WHEN '01'.
CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
EXPORTING
input = date2
IMPORTING
output = date_format.
IF sy-subrc EQ 0.
date_format1 = date_format.
ENDIF.
For getting date in the format like 10.December.2008*
WHEN '02'.
CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
EXPORTING
input = date2
IMPORTING
output = date_format.
IF sy-subrc EQ 0.
Get Month Long text
SELECT SINGLE ltx
FROM t247 INTO ws_month
WHERE ktx EQ date_format+3(3)
AND spras EQ 'E'.
IF sy-subrc EQ 0.
CONCATENATE date_format0(2) ws_month date_format7(4) INTO date_format1 SEPARATED BY space.
ENDIF.
ENDIF.
Hope this helps,
Manish -
How to convert Date format from yyyy mm dd to dd mmm yyyy in ADF
Hi,
I have Date Format in Data Base as yyyy mm dd, but in the UI I want to display the format as dd mmm yyyy, which code I have to write to get the required format in JDev 11.1.2.3Hi,
Use converter : &lt;af:convertDateTime&gt;
See also : convertDateTime Demo
-Arun -
Date Format from YYYYMMDDhhmmss to dd-MMM-yy
Hi All,
I have a problem with the Date Format.
The out of the BAPI date format is like YYYYMMDDhhmmss and the output value is like 20,070,831,235,959. Now I want insert the date in to my Oracle database like dd-MM-yy.
Here is my xmlformat
datefromxmlformat(datetoxmlformat(Repeater_0.Output{/item/PERIOD_END},"yyyy-MM-dd
HH:mm:ss"),"dd-MMM-yy")
Can any one please correct this issue.
Thanks
MuvvaHi Muvva,
If you want to convert a date from "yyyyMMddhhmmss' to 'dd-MM-yy' format, you may use the dateformat function. For example, the below will give you the result 30-08-08
dateformat("20080830121110","yyyyMMddhhmmss","dd-MM-yy")
In your case,
dateformat(Repeater_0.Output{/item/PERIOD_END},"yyyyMMddhhmmss","dd-MM-yy")
"dd-MMM-yy" will give you the result as "08-Aug-08", if you are looking for that format.
John
Edited by: John George on Aug 27, 2008 10:22 AM -
Convert date format from MONTH-YEAR to dd/mm/yyyy
Dear All
i want to get parameter in form of MONTH-YEAR AND WANT TO CONVERT DATE INTO 'THIS FORMAT dd/mm/yyyy' IT GIVES ME ERROR PLEASE GUIDE.
SELECT
TO_CHAR (PTP.END_DATE,'MONTH-YY') ,
to_date ( TO_CHAR (PTP.END_DATE ,'DD-MONTH-YYYY') ,'dd/mm/yyyy'),
--- i want to gent parameter in from of MONTH-YEAR AND WANT TO CONVERT DATE INTO 'THIS FORMAT dd/mm/yyyy' IT GIVES ME ERROR PLEASE GUIDE
to_date ( TO_CHAR (PTP.END_DATE ,'MONTH-YYYY') ,'dd/mm/yyyy'),
ADD_MONTHS((to_date ( TO_CHAR (PTP.END_DATE ,'MONTH-YYYY') ,'dd/mm/yyyy'),-1)
--- i want to gent parameter in from of MONTH-YEAR AND WANT TO CONVERT DATE INTO 'THIS FORMAT dd/mm/yyyy' IT GIVES ME ERROR PLEASE GUIDE
ptp.END_DATE PERRIODS_NAME
from per_time_periods ptp
Regards
Edited by: user10941925 on Nov 28, 2011 12:23 AMHello just check
SQL> select hiredate from emp;
HIREDATE
17-DEC-80
20-FEB-81
22-FEB-81
02-APR-81
28-SEP-81
01-MAY-81
09-JUN-81
09-DEC-82
17-NOV-81
08-SEP-81
12-JAN-83
03-DEC-81
03-DEC-81
23-JAN-82
14 rows selected.
SQL> select to_char(hiredate,'month-year') from emp;
TO_CHAR(HIREDATE,'MONTH-YEAR')
december -nineteen eighty
february -nineteen eighty-one
february -nineteen eighty-one
april -nineteen eighty-one
september-nineteen eighty-one
may -nineteen eighty-one
june -nineteen eighty-one
december -nineteen eighty-two
november -nineteen eighty-one
september-nineteen eighty-one
january -nineteen eighty-three
december -nineteen eighty-one
december -nineteen eighty-one
january -nineteen eighty-two
14 rows selected.
SQL> select to_char(hiredate,'dd/mm/yyyy') from emp;
TO_CHAR(HI
17/12/1980
20/02/1981
22/02/1981
02/04/1981
28/09/1981
01/05/1981
09/06/1981
09/12/1982
17/11/1981
08/09/1981
12/01/1983
03/12/1981
03/12/1981
23/01/1982
14 rows selected.
SQL> -
Convert date format from 'dd/mon/yy' to 'mon/yy'
I know there's probably a load of questions already on this but I can't locate a simple straightforward explanation with examples on how to change the date 'DD/MON/YY' format to a month/year format 'MON/YY'.
Can anyone assist with a useful response, Thankswoof777 wrote:
Thanks both of you for the prompt responses.
I used the to_char(sysdate,'mmyy') from dual response, but also found the other useful.
Just another quick question, this field was in date format, why did I need to change it to CHAR?DATE datatype have NO format & are stored as BINARY values.
The only datatype that can be presented to screen, CRT, or data file are ASCII CHARACTERS!
Your Mileage May Vary below
19:28:46 SQL> select sysdate from dual;
SYSDATE
2012-08-19 19:28:53
19:28:53 SQL> -
How to change the date format from default to mm-dd-yyyy?
Hi,
There is a requirement to show the current date in an error message at the attribute level. That is, if the user input a date in a text field that is earlier than today's date, then an error message must immediately pop up with today's date in the message. To achieve this we are using a token expression in the EO ( Under Validation rules) . The token expression uses adf.currentDate to get today's date.
The problem is that the expression extracts the date in the form of yyyy-mm-dd. What expression should I use to get the current date format in mm/dd/yyyy ? Can I modify the adf.currentDate expression in some way to get the desired format?
Thanks,
AnandYou could write a custom EO method to return today's date in the specific format. Then access it via the Groovy adf.object expression.
-
How to convert date format to ISO8601 in Oracle BPEL
Hi,
I need to convert date format from YYYY/MM/DD 00:00:00 to YYYY-MM-DDThh:mm:ss format in oracle BPEL. Can any of you help me out. Thanks in advance.Hi Anuj,
I have use the below mentioned code to convert the date format.
<db:P_X_DATE_FROM>
<xsl:value-of select='concat(substring(../VALUE,1.0,4.0),"-",substring(../VALUE,6.0,2.0),"-",substring(../VALUE,9.0,2.0),"T",substring(../VALUE,12.0,8.0))'/>
</db:P_X_DATE_FROM>
Thanks & Regards,
Jyotirmoy. -
Need help in converting date format
Hi,
Need help in converting date format from 'DD-MON-YYYY' to 'YYYY-MM-DD' in an .rtf template as I believe xml publisher supports the date format as 'YYYY-MM-DD' only.
Thanks,
Raj.I got the same problem, anyone know how to solve this problem? I allready found some date functions on http://blogs.oracle.com/xmlpublisher/2008/09/date_functions.html . I also tried <?xdoxslt:month_name(xdoxslt:get_month(xdofx:substr(NEED_BY_DATE, 4,3)), $_XDOLOCALE), 0, 'nl-NL')?>, but then it returns a namespace error (Caused by: oracle.xdo.parser.v2.XPathException: Namespace prefix 'xdofx' used but not declared.). Anyone know how to fix this?
Edited by: user11165753 on 7-dec-2009 23:50 -
Date format from DD/MM/YY to YYYYMMDD
Hi Guys,
Date foramt DD/MM/YY(23/09/08) is coming from the flatfiles
(text files). I want to convert it to YYYYMMDD format.
Is it possible to convert date format from DD/MM/YY to
YYYYMMDD?
I'm in BI 7.0 environment.When I load date like DD/MM/YY
(23/09/08) till PSA.In PSA it is showing 08.0/.06/9.
Please suggest me the right way.It is very impartant for us.
Thanks
PrasadHi Guys,
I understand that this leads to degrade the loading
Performance.But I don't have the alternative.
When I use the RSDAT in data source conversion routine it is
throughing the below error.
"Error 'Date .30.0806 contains invalid characters...' at conversion exit CONVERSION_EXIT_RSDAT_INPUT (field CALDAY record 1, value 6/30/08)"
Can any body suggest me the other way or any other date
converion routine from 23/09/08 to YYYYMMDD without slash?
Thanks
Prasad -
Is there any function module to convert date format?
Is there any function module to convert date format from mm/dd/yyyy to dd.mm.yyyy or sy-datum?
Hi,
wirte statement converts any date fomat in system date fromat
WRITE w_DateTO w_date_sys.
Regards,
Sriram -
Convertinf Date format from YYYY-MM-DD to MMDDYYYY
Hi Experts,
I want to convert date format from yyyy-MM-dd to MMDDYYYY ( i am using this format in the file strucure),
i tryed using date tranfer funcion source as yyyy-MM-dd and target as yyyyMMdd this is working fine.
i tryed using date tranfer funcion source as yyyy-MM-dd and target as MMddyyyy this is giving error.
Please help me out,
Thanks,
DhanushHi,
From the error it looks like the date value is coming as blank in the source. please give the date in the same format as you have provided in datetrans function and test it again. It will work.
It might be possible that there are some other date fields in your source where you are not passing any value and using datefunction. please look carefully at all the source structure and data.
thanks
amit
reward point if suggestion works
Maybe you are looking for
-
Hi all, I need to do high-frequency, high-channel-count acquisition. Specs Signals: 10 MHz, 60 channels Controller: PXIe-8135 (Windows 7) Chasses: PXIe-1085 (2x) Input cards: PXIe-7962R FlexRIO base with NI-5734 digitizer (15x) Description Each FlexR
-
Clipping using Firewire Interface Presonus Firebox
Hello, I'm new to this forum and recently just getting acquainted with using GB 2 and my new Presonus Firebox interface, which I acctually bought from reading the recommendations on this forum. So thanks for the suggestions! My issue is I'm recording
-
import java.util.Scanner; public class Garage double hours; double charge; public void startCharging() Scanner input = new Scanner(System.in); double total = 0.0; double fee; System.out.print("Enter the nu
-
Using Windows 7 as a file server:
Hello All, I am pretty new to networking, and have no experience with Mac Server, but a little bit with Windows server. I have a Windows PC at home, that I am using as a file server for my mac and other PC's. I have been able to get everything to see
-
HI! I am not able to connect my Oracle datbase in Applet. Please give ur suggestions. Thanx in Adv Vink