How to convert no of days in below format
i have two dates fields.
startdate and enddate
i am getting no of days from enddate - startdate
for example
startdate = 01-jan-11
enddate = 31-mar-11
select to_date('15-APR-12') - to_date('01-JAN-11') from dual;
470i want to display above query result in
1 year 3 months 15 daysit is possible.?
The solution will not return consistent results always :
WITH
tst AS
SELECT
to_date('15.01.2012','dd.mm.yyyy') d1,
to_date('16.01.2011','dd.mm.yyyy') d2
FROM
dual
SELECT
extract(YEAR FROM (d1-d2) YEAR TO MONTH )
||' year(s)' as yr,
extract(MONTH FROM (d1-d2) YEAR TO MONTH )
||' month(s)' as mnt,
(d1-TRUNC(d1,'mm')+1)
||' day(s)' as dy
FROM
tst
YR MNT DY
1 year(s) 0 month(s) 15 day(s)
Similar Messages
-
I have a MacBook Pro, I want to copy Itunes files to an SD card to play in my car, the SD Card doesn't appear in Itunes when I insert it, and I don't know how to convert the files to the correct format, can anyone help?
Thank youSo it seems from reading the COMMAND manual that my first issue is that I used a 16GB SD card, and the manual says it will only recogize up to a 2GB SD card. I did use my MB Air's SD card slot and crated a folder and dragged the music files to it, then to the card. So I am going to get a 2GB card and try that next. Otherwise just stick with the iPOD connected. At least that is 8GB
-
How to convert internal table data to PDF format
HI,
I have an internal table data having one field with 255 chars. length.I want to send that intenal table data as attachemnt with external mail. i am thinking of converting that data into PDF format and use the FM to send the mail. How to convert internal table data to PDF format.
KishoreIn which format is your data in the internal table currently. Is it returned by a smartform/script or its just data fetched from some database table into an internal table. Since its obvious that the data should appear in the PDF with some Layout, you should be using smartform to format the data properly. See the Link
Smartform to PDF to EMAIL
This shows convertion of smartform to pdf and send it through email
Regards,
Abhishek -
How to convert binary file to a particular format?
Hi,
I am having a requirement. I have in database various kinds of files stored as binary format. Its a sybase database. Now the files can be .pdf, or .doc also. But they are stored in binary format.
I need to read the file from database.
Now I can use jdbc to read the particular column value which contains the file in binary format.
But tricky part is how to convert the binary file entry in a proper respective file format? So I have another column which basically has the value to tell the type of file. So I have ".doc" or ".pdf" as each entry of file...
So please help me how can we do this using Java?
THanksHi,
I am having a requirement. I have in database various
kinds of files stored as binary format. Its a sybase
database. Now the files can be .pdf, or .doc also.
But they are stored in binary format.
I need to read the file from database.
Now I can use jdbc to read the particular column
value which contains the file in binary format.
But tricky part is how to convert the binary file
entry in a proper respective file format? So I have
another column which basically has the value to tell
the type of file. So I have ".doc" or ".pdf" as each
entry of file...
So please help me how can we do this using Java?
THanks -
How to convert message in XI into PDF format
Hi,
I am trying out a scenario where i am getting an idoc from SAP into XI and now in XI i need to convert the data into pdf format and send that pdf in a mail using mail adapter.
Can any body help me out how to convert a message in XI to pdf format.
Thanks in Advance!!
Regards,
SudheerHi Sudheer
follow these links
http://www.erpgenie.com/sap/sapedi/Conversion%20of%20IDOCs%20to%20XML%20format.pdf
Here is the complete code for you;
It Converts spool request into PDF document and emails it.
http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
Smartform as attachment in mail. - 46k
http://sap.ittoolbox.com/groups/technical-functional/sap-dev/convert-smartforms-form-in-pdf-998715 - 87k
SMART form to PDF
https://wiki.sdn.sap.com/wiki/display/Snippets/ConvertSmartformtoPDFformat
smartform to MAIL
https://wiki.sdn.sap.com/wiki/display/Snippets/SmartformtoMailasPDF+attachment
Regards
Sandeep Sharma
PS: if helpful kindly reward points -
How to convert cXML dtd files into xsd format and use them into BPEL application
Hi,
In my BPEL application I have to use cXML dtd files by converting them into xsd format.
I have used 'Microsoft Visual Studio' for converting cXML.dtd file into xsd format, for this 1 dtd file I am getting three xsd files (cXML.xsd, cXML1.xsd and cXML2.xsd).
Please check this once and let me know
1. why I am getting three xsd files for one dtd file,
2. how can I use cXML.xsd file in my application, do I ll have to use all the three files in my BPEL app and
3. what should I include in main xsd file (cXML.xsd) to import other two xsd files.
kindly check this once and let me know your suggestions .
ThanksHi,
While downloading the cXML dtd there will be example xml files. Using this xml's we can generate xsd.
Regards,
KANN. -
How to convert electronic account statement to MultiCash format?
Hi,
Please provide me procedure for following conversions:
(1)How to convert electronic account(bank) statement(of Saudi Arabia country) to MultiCash format?.
(2)How to convert electronic account(bank) statement from MT940 format to MultiCash format?.
Thanks & Regards,
Seshagiri.Hi,
Please provide me procedure for following conversions:
(1)How to convert electronic account(bank) statement(of Saudi Arabia country) to MultiCash format?.
(2)How to convert electronic account(bank) statement from MT940 format to MultiCash format?.
Thanks & Regards,
Seshagiri. -
How to convert internal table data into excel format?
Hi all,
I want to convert internal table data in excel format and then
send it as email attachment in workflow.
Please tell me how do i perform this.
Regards,
Arpita.Hi Arpita,
Try this sample code::
Send mail
maildata-obj_name = 'TEST'.
maildata-obj_descr = 'Test Subject'.
loop at htmllines.
mailtxt = htmllines.
append mailtxt.
endloop.
mailrec-receiver = 'your receiver mail id'.
mailrec-rec_type = 'U'.
append mailrec.
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_data = maildata
document_type = 'EXL'
put_in_outbox = 'X'
tables
object_header = mailtxt
object_content = mailtxt
receivers = mailrec
exceptions
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
others = 8.
if sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
Hope it will help you.
Regards,
NIkita -
How to convert my video's to apple format?
I have alot of videos that are in DIVX and AVi format that itunes and my ipod will not accept. So how the heck do I convert them into an ipod friendly format? Really getting on my nerves since I bought this ipod how much trouble ive had with music and video's....might consider getting a Sandisk with its drag and drop.
anyways can anyone plz explain how to do it in itunes so it doesnt make me return this new ipod.Search for __Skuld Video iPod Converter__. It takes a little while to convert each video file, but that's to be expected. Completely free, no watermark, no hassle.
-
How to convert rm/rmvb to ipod palyable format?
I download many chinese TV shows, but unfortunately, they're all in rm or rmvb format. Is there any way or any program that can help me to convert these to an ipod playable format or at least avi or mpg4 ?
PS it should not be expensive (freeware would be so awesome)
Thanks a lot in advance
Enoch
Victoria CanadaEnoch,
The best Video Conversion software available is "VisualHub".
Though not free,it's very reasonably priced at $23.32 USD.
http://www.techspansion.com/visualhub/
Jim
PowerBook G3 500 Mhz "Pismo"/ 2.0Ghz BlackBook 2GB OWC RAM Mac OS X (10.4.8) -
How to Convert years into days.
Hi,
I had secenario to convert a years in to days. Number of years should be more than one.
Leap year need to be considered in this calculation. Can any one suggest this?something like
SQL> with test as
2 (select to_date ('01-01-2004', 'dd-mm-yyyy') from_date
3 , to_date ('31-12-2004', 'dd-mm-yyyy') + 1 to_date
4 from dual union all
5 select to_date ('01-01-2010', 'dd-mm-yyyy') from_date
6 , to_date ('31-12-2010', 'dd-mm-yyyy') + 1 to_date
7 from dual
8 )
9 select from_date
10 , to_date
11 , to_date - from_date days_diff
12 from test
13 /
FROM_DATE TO_DATE DAYS_DIFF
1-1-2004 1-1-2005 366
1-1-2010 1-1-2011 365 -
How to convert parameter in to proper date format in unix.
My requirement is to convert parameter string (012011) as a date in unix without support from other like sql. then once it is converted into date format how to increment it by one day. Here i want to use my own date rather than system timestamp of unix system. Please help.
I am unix HP unix 11.Moderator Action:
Your question is outside the scope of this Linux forum space, and is locked.
You seem to hope for assistance with a specific Unix that is a product from a specific company.
I suggest you go to that company's forum community and ask there. You will undoubtedly find many people there that are familiar with the nuances if that OS. -
How to convert date into dd mon yyyy format
hi all,
i have a problem in date format i am using date like below .
<%java.util.Date date = new java.util.Date();%>
i am inserting date into a table and its storing like this
insert into tablename (d_date) values (date)
and its inserting date like below
Sun Oct 19 09:05:45 GMT+03:00 2003
i want to fetch date in dd mon yyyy format.
with this format i want to make a select query.i struck with the format conversion.
how to do this.
any comments please.
any helphi all,
i understand now where i am wrong.
the below code is not working why because in my server where i am executing code the regional setting month value is in arabic.
i executed the same code in a different server where date and time jones are english its working fine.
All the problem is in regional setting and not the jsp code.
<%
String whtEverDateFormatYouWAnt = "dd MMM yy";
String str = new SimpleDateFormat(whtEverDateFormatYouWAnt).format(new SimpleDateFormat("EEE MMM dd HH:mm:ss vvv yyyy").parse("Sun Oct 19 09:05:45 GMT+03:00 2003"));
out.print(str);
%>
Thanks a lot for the excellent solution.
Thanks again. -
How to convert case-sensitive to extended journal format
I have two apple computers (extended journal format) that have been backed up via a time capsule. I have just noticed that the TC is formatted as case-sensitive. I do not know why case-sensitive. In an effort to ensure consistency of file format then I seek to somehow remove case-sensitive formatting. I presume no/minimal underlying case-sensitivity issues within file names as source data is not formatted in case-sensitive manner.
I have tried SuperDuper to clone the TC to an external HDD but the application cloned the formatting in addition to the data.
I have attempted use of Disk Utility to copy content from source (TC) to destination (HDD) but this yielded error messages that noted different file format types.
It there a way to convert/remove case sensitive formatting from TC?
I appreciate that I could simply reformat TC to extended journal format but this would presumably erase all my backup data.
Any guidance most welcomed.RossM wrote:
So I guess my choice is to "leave well alone" as Pondini suggests and accept the fact that cloning TC onto HDD has now formatted my new HDD as case-sensititive.
Actually, you may have two choices, depending on how you're going to be backing-up to the new HD:
Your best bet, by far, is to back up to it directly, rather than connecting it to the TC. That's much faster and more reliable. If so:
* Leave the TC backups alone. Reformat the HD as case-ignorant and let Time Machine start fresh on it. You can always see and restore from the old ones via the Browse... option, per Time Machine - Frequently Asked Question #17.
* Format the HD as case-sensitive and copy the backups from the TC to it. But don't copy the whole sparse bundle; copy the Backups.backupdb folder from the sparse bundle to the top level of the HD. (Sparse bundles are used only for network backups.) See #18 in the FAQ; you'll need the 4th procedure (copy network backups to be used locally.
But if you're going to connect the HD to the TC and back up to it that way, it doesn't matter how you format the HD, since the backups must be in a sparse bundle, that has its own format. Two choices for that:
* Leave the TC backups alone. Connect the HD to the TC and select it as the TM destination, and Let Time Machine start fresh on it. You can always see and restore from the old ones via the Browse... option, as above. (There is a way to speed up the first backup; see the blue box in #Q2 of Using Time Machine with a Time Capsule.)
* Copy ("Archive") the TC's internal disk to the external HD, per the green box in #Q6 of the same article. Then select the external as your Time Machine destination via Time Machine Preferences.
Is this simply deferring a problem issue to another time (aagh)? Or to somehow try and remove this inconsistency and remove case-sensitive formatting from all tech items, even if this might mean reformatting and losing old backup data?
No. There's not really a problem, unless you change the case of file/folder names and try to restore the old ones to the same place via the TM browser, per the link in my earlier post. That's the only possible downside.
Does Time Machine require case-sensitive formatting on its destination drive?
No. It's the default, but case-ignorant is fine, unless you ever want to add a case-sensitive volume. Then you're in a pickle.
Or does Time Capsule only function witih case-sensitive formatting?
No. The TC's actual disk is case-ignorant; it's only the Time Machine sparse bundle that's case-sensitive by default.
The benefit of case-sensitive formatting as Apple default seems rather unclear to me
It's the default only for Time Machine backups. Everything else defaults to case-ignorant.
The advantage is, once you've been backing-up your internal HD for weeks, months, or years, and want to add a case-sensitive external HD to be backed-up, you can. If the backups are case-ignorant, you can't. -
How to convert text file into xml file format with and check that with DTD
I have an text file with | seperator . I have to convert this to an xml file and check with DTD present with me..
plz help me outcan i get some code that how to compare the xml with dtd or just give the DTD name with an XML
Maybe you are looking for
-
Excise Invoice cannot be captured for RG1(Finished Goods) material
Dear Friends, While creating GR and choosing the option only capture Excise Invoice system showing error as follows: Excise Invoice cannot be captured for RG1(Finished Goods) material Message no. 4F276 The Material is a Raw Material(ROH) and Price co
-
So, as other users asked, can I download the "trial" versions of CS6 apps and install them the normal (sic, since all Adobe methods are strangely problematic) way then license through my cloud subscription?
-
TextField: how to disable the accent input window for e,o,a keys
I have a TextField and when I keep one of the keys 'e', 'a' or 'o' pressed I see an odd new window that allows me to enter accent characters using the mouse. Since this new window is displayed at the wrong position (somewhere below my actual Stage) I
-
Hi all, Just to cheer you all up, over on the MacRumors site there is talk of a new (the first?) OS X virus. www.macrumors.com
-
Macbook only shuts down when battery is flat and date and time revert to 2008
Hey Guys My Macbook only shuts down when the battery goes flat. When I switch it back on everything seems to be fine though the date and time are incorrect. Seems to go to default date which is 2008. Other things seem to affect my browser, Facebook w