How to convert date from "yyyymmdd" to "MM/DD/YYYY" format
1. I have one BLDAT field in my internal table.
its getting updated from input file.
2. The value in the input file is like yyyymmdd.
So the internal table field is filled like this
"YYYYMMDD".
3. After this,I have to compare this internal table
field with BSAD table.
4. The BLDAT field in BSAD table is in the format of
"MM/DD/YYYY".
5. the BLDAT field is having diff format in internal table and BSAD table.So I am unable to check this value.
How to convert it as like the BSAD table format."MM/DD/YYYY" format.
Thanks in advance!!
Using the WRITE statement
data: gd_date(10). "field to store output date
* Converts date from 20020901 to 09.01.2002
write sy-datum to gd_date mm/dd/yyyy.
OR u can
CONCATENATE gd_date+4(2) gd_date+6(2) gd_date+0(4)
into gd_date seperated by '/' .
Hope this helps.
Kindly reward points and close the thread for the
answer which helped u OR get back with queries.
Similar Messages
-
Function module to change Date from YYYYMMDD to DD.MM.YYYY
Hi
PLease tell me the function module that will convert date from YYYYMMDD to DD.MM.YYYY
ThanksHi,
data lv_date1 type sy-datum.
data lv_date2(12).
lv_date1 = '20070123'.
concatenate lv_date16(2) lv_date14(2) lv_date1+0(4) into lv_date2
separated by '.' .
is what you require to do;
now lv_date2 = 23.01.2007.
Also look for conversion routine "CONVERSION_EXIT_PDATE_OUTPUT"
EG: call function CONVERSION_EXIT_PDATE_OUTPUT
exporting input = lv_date1
importing output = lv_date2.
Thanks,
Anitha -
Convert date from YYYYMMDD to DDMMYYYY
Please help if anyone knows any function module to convert date from YYYYMMDD to DDMMYYYY format..
Thanks in Advance,
manjariHello.
Simply do like this:
DATA: datum TYPE char10.
WRITE sy-datum TO datum <format option>.
<format options>:
DD/MM/YY and MM/DD/YY:
Both additions have the same effect. The date output has a two-digit year value and a separator. The separator and the order are taken from the definition for date output in the user master record.
DD/MM/YYYY und MM/DD/YYYY:
Both additions have the same effect. The date output has a four-digit year value and separator. The separator and the order are taken from the definition for date output in the user master record.
DDMMYY und MMDDYY:
Both additions have the same effect. The date output has a two-digit year value and no separator. The order is taken from the definition for date output in the user master record.
YYMMDD:
This addition provides a date output with a two-digit year value without a separator in the format YYMMDD.
Regards.
Valter Oliveira. -
How to convert date from ccyymm format to mmddyy
hi,
How to convert date from ccyymm format to mmddyyPlease don't multipost. This question has been answered in your first post.
How to convert date to ccyymm format
Regards,
Jo -
Need to convert Date from calendar to String in the format dd-mom-yyyy
Need to convert Date from calendar to String in the format dd-mom-yyyy+..
This is absolutely necessary... any help plz..
Rgds
ArwinderLook up the SimpleDateFormat class: http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html
Arwinder wrote:
This is absolutely necessary... any help plz..For you maybe, not others. Please refrain from trying to urge others to answer your queries. They'll do it at their own pace ( if at all ).
People on the forum help others voluntarily, it's not their job.
Help them help you.
Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
(Yes I know it's on JavaRanch but I think it applies everywhere)
---------------------------------------------------------------- -
How to convert data from a report in PDF which are specified on multiple lines ?
It often occurs that in a report one detail entry is folded onto two subsequent lines.
e.g.
No.
Container Lt Ht Tp F/E Dam Weight Temp Bi Im First Seal No. Cell Booking ref.
In Arr id A Tml PoL PD PoD C T L R F B
1 XXXU123456-7 20 ST I F 24.000 SLX11 1 25A CVA12345
How does the conversion to Excel is going to handle this ?
I need the second line of data in my excel sheet.
YES 9/10 14:15 BEANR REFCTHello Jay,
Don't use SSIS to convert. Use SSIS to FTP the files out.
How you convert to PDF: the format is owned by Adobe so there might be royalties involved, but there are paid and free (OSS) libraries to doing so. Just search online.
Arthur
MyBlog
Twitter -
How to convert data from rows into columns
Hi,
I have a sql table and the data looks like this
GLYEAR GLMN01 GLMN02 GLMN03 GLMN04
2007 -109712.40 6909.15 4758.72 56.88
2007 -13411.32 19132.9 -5585.07 4362.64
Where GLyear reprsents Year and GLMN01 is February, GLMN02 is March and so on,
Now i want my output to be something like this which i want to insert into another table
GLYear GLMonth GLAmount
2007 February -109712.40
2007 March 6909.15
2007 April 56.88
My new table has 3 columns, GLYear,GLMonth,GLAmount.
Can someone please help me with the select statement on how to do this, i can work with the inserts.
Thanks.I want you to check these form tread they have the same discussion as you. They will definitely solve your problem
http://blog.jontav.com/post/8344518585/convert-rows-to-columns-columns-to-rows-in-sql-server
http://dba.stackexchange.com/questions/19057/convert-rows-to-columns-using-pivot-in-sql-server-when-columns-are-string-data
http://stackoverflow.com/questions/18612326/how-to-convert-multiple-row-data-into-column-data-in-sql-server
I hope this helps you in solving your problem.
Please remember to click “Mark as Answer” on the post that has answered your question as it is very relevant to other community members dealing with same problem in seeking the right answer -
Convert data from internal table to XML file.
Hi All,
I am selecting data from database into one internal table.
Now I want to convert data from internal table to xml file format and save in to my desktop. Please suggest me how I can achieve my requirement.
Kindly reply me ASAP.Use this FM. SAP_CONVERT_TO_XML_FORMAT
Check this link too -
Re: Data Export in XML format
XML files from ABAP programs -
How to convert date to ccyymm format
Hi,
How to convert date to ccyymm format.
Thanksdadivela wrote:
Re: How to convert date from ccyymm format to mmddyyI didn't inderstand. Date doesn't have any format. If you have a string in CCYYMM format, you would have to extract the YYMM from the string.
SQL> SELECT SYSDATE,
2 TO_CHAR (SYSDATE, 'ccyymm') Date_Fm,
3 SUBSTR (TO_CHAR (SYSDATE, 'ccyymm'), 3) YYMM
4 FROM DUAL
5 /
SYSDATE DATE_F YYMM
08-JUN-09 210906 0906You can use this string to convert it to date. Note that since DD part of your date was not their in the resultan string, the converted date will fall back to first of the month specified.
SQL> SELECT SYSDATE,
2 TO_CHAR (SYSDATE, 'ccyymm') Date_Fm,
3 SUBSTR (TO_CHAR (SYSDATE, 'ccyymm'), 3) YYMM,
4 TO_DATE (SUBSTR (TO_CHAR (SYSDATE, 'ccyymm'), 3), 'YYMM') conv_Dat
e
5 FROM DUAL
6 /
SYSDATE DATE_F YYMM CONV_DATE
08-JUN-09 210906 0906 01-JUN-09
SQL>Then convert the date into the required format using TO_CHAR Function
SQL> SELECT SYSDATE,
2 TO_CHAR (SYSDATE, 'ccyymm') Date_Fm,
3 SUBSTR (TO_CHAR (SYSDATE, 'ccyymm'), 3) YYMM,
4 TO_DATE (SUBSTR (TO_CHAR (SYSDATE, 'ccyymm'), 3),
5 'YYMM') conv_Date,
6 TO_CHAR(TO_DATE(SUBSTR(TO_CHAR (SYSDATE, 'ccyymm'),3),
7 'YYMM'), 'MMDDYY') New_Format
8 FROM DUAL
9 /
SYSDATE DATE_F YYMM CONV_DATE NEW_FO
08-JUN-09 210906 0906 01-JUN-09 060109
SQL>Hope this helps.
Regarads,
Jo -
ABAP program to output data from SAP table to an XML format file?
hello ABAP experts,
Does anyone know how to output data from SAP table to an XML format file? Would be appreciated if someone show the detailed sample codes and we will give you reward points!
Thanks!Edited by: Jose Hugo De la cruz on Aug 19, 2009 8:23 PM
-
How to convert date format dd.mm.yy into yyyymmdd?
Hello experts,
how to convert date format dd.mm.yy into yyyymmdd?
Thanx
AxelHi
go through these previous threads on similar question
https://forums.sdn.sap.com/click.jspa?searchID=673529&messageID=1763194
Date Conversion in Flat File
converting the DATE(yyyymmdd) into MONTH(yyyymm) format
Date Format Conversion from MM.DD.YYYY to YYYYMMDD
gives clear idea
Reagrds
Kiran
Message was edited by:
ravi kiran naalla -
How to I convert data from oracle database into excel sheet
how to I convert data from oracle database into excel sheet.
I need to import columns and there datas from oracle database to microsoft excel sheet.
Please let me know the different ways for doing this.
Thanks.asktom.oracle.com has an excellent article on writing a PL/SQL procedure that dumps data to an Excel spreadsheet-- search for 'Excel' and it'll come up.
You can also use your favorite connection protocol (ODBC, OLE DB, etc) to connect from Excel to Oracle and pull the data out that way.
Justin -
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. -
How can i convert data from DBF to oracle database 10g?
Sir,
How can i convert data from DBF to oracle database 10g?I assume you at least know how to dump the contents of foxpro dbf file into CSV format.
Regarding SQL*Loader, hope this demo makes it a bit clear to you...
http://www.princeton.edu/~storacle/sqlloader_demo.shtml
I agree that it is an old web page (references Oracle 8.0.5) but basics remain the same.
If it is still unclear to you after referring above link, then get an Oracle consultant. -
How to retrieve data from catsdb table and convert into xml using BAPI
How to retrieve data from catsdb table and convert into xml using BAPI
Points will be rewarded,
Thank you,
Regards,
Jagrut BharatKumar ShuklaHi,
This is not your requirment but u can try this :
CREATE OR REPLACE DIRECTORY text_file AS 'D:\TEXT_FILE\';
GRANT READ ON DIRECTORY text_file TO fah;
GRANT WRITE ON DIRECTORY text_file TO fah;
DROP TABLE load_a;
CREATE TABLE load_a
(a1 varchar2(20),
a2 varchar2(200))
ORGANIZATION EXTERNAL
(TYPE ORACLE_LOADER
DEFAULT DIRECTORY text_file
ACCESS PARAMETERS
(FIELDS TERMINATED BY ','
LOCATION ('data.txt')
select * from load_a;
CREATE TABLE A AS select * from load_a;
SELECT * FROM A
Regards
Faheem Latif
Maybe you are looking for
-
How to set Proxy for IE 8.0 on doing Load Testing with OATS 12.1.0.2
I have tried adding proxy server by adding the address to "Localhost" and Port as 8080. but nothing is working out, for recording an EBS instance its working fine ,no need to setup anything in the OATS tool, eg, Proxy settings. But when it comes to B
-
ATI radeon 9800 pro (256MB)-- Apple 23" HD
ive had this graphics card for a good couple of months, about 6 or so to be exact, a card given to me by a friend who just didnt need it anymore, upgraded to something or other. now, the issue is that two days ago, it just stopped working. i tried to
-
I have downloaded a pattern from the web but can't locate it on my iPad. Help please
I have downloaded a pattern from the web but can't locate it on my iPad. Help please
-
Problem on Installing RAC System - Oracle Linux 6.2 and 11gR2
Folks, Hello. I just start to install 4-nodes RAC system using VMplayer 3. The host Operating System is Windows 7. The Guest OS is Oracle Linux 6.2. Because my computer's hard disk does not have enough space, I install the Guest OS Oracle Linux 6.2 i
-
I'm trying to update a Muse site and it keeps telling me that the site was created with a different version of Muse. I have updated Muse and still can't access the site to make changes.