Please suggest how to convert number of days, months, years

Dear all,

I have a requirement, where to get a value of function, say 61 (in days).

I want to display it in the report as, (60/30 + 1)

Years months days

0          2            1

Please suggest.

Thanks in advance.

Kind regards

Afzal.

You could act as some sort of an astronomer: year - Wikipedia, the free encyclopedia

Select: days of entry,

floor (: days/365.25) years.

Floor (mod(:Days,365.25) / (365.25 / 12)) months.

ceil (mod (: days, 365.25/12)) days

of the double

but do not be surprised

DAYS YEARS MONTHS DAYS
731 2 0 1
730 1 11 30
366 1 0 1
365 0 11 31
364 0 11 30
92 0 3 1
91 0 2 31
90 0 2 30
62 0 2 2
61 0 2 1
60 0 1 30
32 0 1 2
31 0 1 1
30 0 0 30
1 0 0 1

Maybe the next version is more beautiful

Select the days,

Floor(Days / 365.25) years.

Floor (mod (Days, 365.25) / (365.25 / 12)) months.

round (mod (days, 365.25/12)) days

periods

DAYS YEARS MONTHS DAYS
731 2 0 1
730 1 11 30
366 1 0 1
365 0 11 30
364 0 11 29
92 0 3 1
91 0 2 30
90 0 2 29
62 0 2 1
61 0 2 0
60 0 1 30
32 0 1 2
31 0 1 1
30 0 0 30
1 0 0 1

Concerning

Etbin

Tags: Database

Similar Questions

  • The date system in the taskbar indicates the year, month, day (as in the army). How can I read the day, month, year?

    The date system in the taskbar indicates the year, month, day (as in the army). How can I read the day, month, year?

    It's weird, in my version (Windows 7 Pro), it shows much more than that.

  • Convert number of dayes per year

    Please I need help to convert many dayes so far

    I have ID as id

    FT * 09025 * 0000000001 date = 20090125

    FT * date 01171 * 0000000002 = 20100620


    therefore must convert number five after FT as from the
    example * 09025 *.

    map 09-2009
    025 dayes annually number card to 25 jan

    example * 01171 *.
    01 card for 2010
    map number 171 of dayes annually to 20 jun
    (jan + Feb + March + April May) (31 + 28 + 31 + 30 + 31) = plus 151

    171-151 = 20 for next month


    Please need help will be so added filter to informatica card with date

    Published by: user8929623 on July 4, 2010 19:04

    Well, I'm not why when 09 maps to 2009, 01 maps to 2010, not in 2001. Assuming that it should be 2001, use YYDDD format:

    SQL> with t as (
      2             select 'FT*09025*0000000001' id from dual union all
      3             select 'FT*01171*0000000002' from dual
      4            )
      5  select  to_date(substr(id,4,5),'yyddd') dt
      6    from  t
      7  /
    
    DT
    --------
    20090125
    20010620
    
    SQL> 
    

    SY.

  • Solution campus 9.0: how to convert temporary 30-day license permits full to MicroFocus Server Express 5.1?

    People,

    Hello. I implement PeopleSoft Campus Solution 9.0 R5 for a University.

    I installed the COBOL compiler Micro Focus Server Express 5.1 Wrap Pack 6 with 30-day temporary license to compile COBOL programs.

    It's been over 30 days now, the temporary license expires. I can't recompile COBOL and COBOL programs run. So, I need to buy a COBOL compiler full license for Micro Focus 5.1 Server Express Wrap Pack 6 run PeopleSoft Campus Solution 9.0

    My question is:

    How to convert the 30-day temporary permit a full license for Micro Focus Server Express COBOL compiler 5.1?

    Thanks in advance.

    .

    People,

    The problem is solved by myself. Thank you.

  • Dates on Firefox don't appear in the American Style, that is, month day year I want to change to day month year please help?

    Could you please tell me how to change the display of the date to display the day month year instead of month day year?

    HOW to: Change the Date, time, number, and currency value displays in Windows XP

    http://support.Microsoft.com/?kbid=307938

    Check and tell if its working.

  • Excerpt of day, month, year

    Hello

    I have a XML tag consisting of date YYYY-MM-DD format. I need to break this date and extract the day, month, year in 3 different columns.

    For this I use <? xdoxslt:get_month('?) DateInvoiceJ_ID20?', $_XDOLOCALE)? > for months. But when I seeds the result to PDF it returns 0 instead of the current month.

    but when I use like <? xdoxslt:get_month('2010-12-09',_$_XDOLOCALE)? > it returns the result real, i.e., 12.

    What should I do to get the result of the XML tag and let me know what format I need to select in the property.

    I use desktop BI Publisher 10g

    Thank you

    If the date in the XML format is always constant (YYYY-MM-DD), then you can simply use the secondary string function to get values.

    Example:

    -Year

    -Months

    -Day

    Otherwise, you can extract values at the SQL level and display because there are in your report.

  • Studio: Chart based on the day/month/year

    In the Studio, there is a requirement for us display the chart based on the day/month/year.

    Because the Date attribute does not appear as a Dimension in the graphics configuration list, I divided attribute date day/month/year attributes and inspiring that I generated a sample chart

    But now I am facing a problem

    Suppose that there are records for only July and Ms then the graph shows in July and Aug, it does not show in August.

    I agree that there is no record for August in my field of data which is the reason why Augustus is not displayed in the table. But according to our requirement, we must view August as well as with zero count.

    I'm curious to know if there is a way to do it.

    The idea behind the record calendar type is a secondary, new record type are you introduction that completes your registration type "sale."  The records you provided would be your 'sales' record type, not your type of registration of "calendar".  To use your example, your recordings of 'sale' would look like what provided you:

    =============== RECORD ==================

    ID: 1

    Sales_Amount: 1000

    Month: October

    RecordType: sale

    Date: 2012-10 - 01 T 00: 00:00.000Z

    day: 01

    year: 2012

    =============== RECORD ==================

    ID: 5

    Sales_Amount: 1000

    Month: December

    RecordType: sale

    Date: 2012-12 - 01 T 00: 00:00.000Z

    day: 01

    year: 2012

    ==========================================

    And your registration type "calendar" would be charged later.  I usually provide a single record of short for all day for this record type:

    =============== RECORD ==================

    ID: 1

    Month: October

    RecordType: calendar

    Date: 2012-10 - 01 T 00: 00:00.000Z

    day: 01

    year: 2012

    =============== RECORD ==================

    ID: 2

    Month: October

    RecordType: calendar

    Date: 2012-10 - T 02, 00: 00:00.000Z

    day: 02

    year: 2012

    ==========================================

    (and so on, one for each day until today... yawn)...

    =============== RECORD ==================

    ID: 790

    Month: July

    RecordType: calendar

    Date: 2013-07 - 31 T 00: 00:00.000Z

    day: 31

    year: 2013

    ==========================================

    Thus, when you write a statement of EQL as:

    RETURN foo AS SELECT

    Sum (Sales_Amount) AS "TotSales.

    GROUP BY month

    You will get a bucket of months for every month, where the record type "calendar" will not fail to offer a month when sales do not offer it... aka. Fill the "holes".

    HTH,

    Dan

    http://branchbird.com

  • How to convert number in the Date format

    Hi Experts,

    I have a date column says. date key order number (ex: 20110202). How to convert this number in format DD/MM/YYYY.

    Thanks in advance
    V

    Vincent Krishna wrote:
    Hi Experts,

    I have a date column says. date key order number (ex: 20110202). How to convert this number in format DD/MM/YYYY.

    Thanks in advance
    V

    SQL> select to_char(to_date('20110202','YYYYMMDD'),'DD/MM/YYYY') from dual;
    
    TO_CHAR(TO
    ----------
    02/02/2011
    
  • Get the number of days, months and year

    Hi all

    I'm using OBIEE 11 g. I have a line of dash for year (2010, 2011, etc.) and months (Jan, Feb,..., Dec). How can I get the number of days in a given month and year in my report?

    For example, if I choose to Jan & 2011, I'd get 31 and 356. And if I choose Feb & 2011, I would get 28 and 356.

    Thank you!

    I have something more good option here... Try to use this

    DAYOFMONTH (TIMESTAMPADD (SQL_TSI_DAY, DAYOFMONTH (CURRENT_DATE) *-1, TIMESTAMPADD (SQL_TSI_MONTH, 1, CURRENT_DATE)))

    This will give you the days for the month in progress (Oct 2011) after calculating the last day of each month... Similary dynamically pass the value Date or month... You will need to modify this function but shud be simple. Hope this helps :)

  • How to convert number in date and time in labview

    Hi all

    I have a hexadecimal string and converted into a number. Now this number to display in the format of timestamp. Uses the format of the time Unix.

    By using this link, I can convert this number to timestamp.  http://www.UnixTimeStamp.com/index.php

    But how it should be done in LabVIEW? I know it may be simple, but please help.

    I enclose my VI for referance.

    Thank you

    Manisha

    Hi Man_Can,

    You can add the origin of UNIX timestamp to your number:

  • I have vista, want to move to 7 but need to save on the hard drive content; Please suggest how I rub off the coast of virus, evil & spy when recording off content before loading of 7... ?

    OS: Vista home prem

    h/w: Dell Studio w/Centrino core 2, 2 GHz, 4 GB ram

    I want to rub the data as I save to an external hard drive, and then reload the OS with 7.

    Don't know what to use as a scrub tool and how to perform the backup off with scub.

    Please notify

    Hello

    1. which version of Windows Vista is installed on your system?

    2. you try to upgrade from Windows Update?

    First of all, I suggest you perform a scan complete antivirus on your computer and make sure your computer is free from Virus or malware.

    Method 1: Run a virus scan

    I suggest to download the Microsoft security since the link Scanner and performs a search on your system. Check if the problem persists.

    http://www.Microsoft.com/security/scanner/en-us/default.aspx

    Note: Microsoft safety scanner ends ten days after downloading. To re - run a scan with the latest definitions of anti-malware, download and run Microsoft Safety Scanner again.

    Now you can transfer your files by using Windows Easy Transfer

    Method 2:

    Step 1:

    I suggest you to Windows easy transfer to download and install it to transfer files on a hard drive.

    http://www.Microsoft.com/download/en/details.aspx?ID=14179

    http://Windows.Microsoft.com/en-us/Windows7/products/features/Windows-easy-transfer

    Step 2:

    Know if your PC can run Windows 7

    http://Windows.Microsoft.com/en-us/Windows/downloads/Upgrade-Advisor

    Step 3:

    To upgrade Windows Vista to Windows 7, follow the link below.

    http://Windows.Microsoft.com/en-us/Windows7/help/upgrading-from-Windows-Vista-to-Windows-7

    http://Windows.Microsoft.com/en-us/Windows7/help/upgrading-from-Windows-Vista-to-Windows-7-custom

    Note: If your edition of Windows Vista can not be upgraded to the edition of Windows 7 that you want to use, you can always install Windows 7 using the custom to place installation option. However, the custom option keeps your files, programs or settings.

    It will be useful.

  • How to convert number in currency format?

    Hi all

    How to use the transformation of BPEL or entitlement,
    I want to convert the number format to currency foramt. (ex, 2000.00-> 2,000.00)

    How to do this?

    Concerning
    Toven.

    Hi Toven,

    More XSL allows you to convert (123456789.80-> 123,456,789.80)




    Output: 123,456,789.00

    Kind regards
    KanmaniRajan

  • What is the date format used in the charts of Microsoft Support policy? Is the day/month/year or month/day/year?

    For example, the Date of beginning of life cycle shows 31/05/2001 (March 5) and the end of Support Date extended watch 07/12/2001 (12 July or December 7).

    The date format is month/date/year. This format is for the start date and end date for extended Support.
    In your example, the start date is May 31, 2001, and the end date would be July 12, 2001.

    I hope this helps.

    Marilyn

  • Please how to convert the photo to the second

    2012-Kia-Rio-SX-side1.jpg11707850_10153403835594354_514303523436587694_n-1.jpg

    Please guys how to convert the kia rio pictures the second perfect like this, and with any program, I know that all steps in details please its very important

    That looks just like you would use the tool pen to redraw on the image and create shape layers (black areas). It could be done in Photoshop or Illustrator.

    Using Photoshop | Draw with the pen tools

  • How to convert the number in time

    Hai All

    How to convert number of datetime function

    I have number 0825 in a table t1 and another table, I have a column of type date

    How can I subtract

    0825 respondent

    Concerning

    Srikkanth.M

    Published by: Srikkanth.M on April 3, 2010 01:18

    Try

    SELECT (
             INTIME
             -
                 TO_DATE(TO_CHAR(Intime,'DD-MON-YYYY')||' '||
                 TO_CHAR(0825,'0000'),'DD-MON-YYYY HH24:MI')
            ) * 24*60 time_diff
    FROM   T1;
    

    * 009 *.

Maybe you are looking for