How to convert days to years, months and days remaining

Hi all
I have the number of days for example: 398 days how
convert 398 days to several years, and the number of months and days remaining
398 days 1 year, 1 month and 2 days
Concerning
Jocelyne

There is no correct answer.

That's right! ;)

Tags: Database

Similar Questions

  • How to get the difference in Date in years, months and days

    Select Sysdate-Birth_date from Employees;
    the query returns the number of days between two dates
    I want to convert this number in years, months and days
    Can someone help me please

    Hoek wrote:
    Try:

    SQL> with t as (
    2  select to_date('01-01-1980', 'dd-mm-yyyy') birthdate
    3  ,      to_date('05-05-2010', 'dd-mm-yyyy') today
    4  from   dual
    5  )
    6  --
    7  --
    8  --
    9  select extract(year from today)-extract(year from birthdate) years
    10  ,      extract(month from today)-extract(month from birthdate) months
    11  ,      extract(day from today)-extract(day from birthdate) days
    12  from   t;
    
    YEARS     MONTHS       DAYS
    ---------- ---------- ----------
    30          4          4
    
    1 row selected.
    

    (May need some adjustments, possibly using the LARGEST, but currently not as long)

    Indeed, a few adjustments...

    SQL> ed
    Wrote file afiedt.buf
    
      1  with t as (
      2    select to_date('31-01-2009', 'dd-mm-yyyy') birthdate
      3    ,      to_date('28-02-2010', 'dd-mm-yyyy') today
      4    from   dual
      5    )
      6  --
      7  --
      8  --
      9  select extract(year from today)-extract(year from birthdate) years
     10  ,      extract(month from today)-extract(month from birthdate) months
     11  ,      extract(day from today)-extract(day from birthdate) days
     12* from   t
    SQL> /
    
         YEARS     MONTHS       DAYS
    ---------- ---------- ----------
             1          1         -3
    
    SQL>
    

    Maybe something like this?

    SQL> ed
    Wrote file afiedt.buf
    
      1  with t as (select to_date('17-nov-2006','dd-mon-yyyy') as c_start_date, to_date('21-jan-2008','dd-mon-yyyy') as c_end_date from dual union all
      2             select to_date('21-nov-2006','dd-mon-yyyy'), to_date('17-feb-2008','dd-mon-yyyy') from dual union all
      3             select to_date('31-jan-2009','dd-mon-yyyy'), to_date('28-feb-2010','dd-mon-yyyy') from dual union all
      4             select to_date('21-jun-2006','dd-mon-yyyy'), to_date('17-jul-2008','dd-mon-yyyy') from dual
      5             )
      6  -- end of test data
      7  select c_start_date, c_end_date
      8        ,trunc(months_between(c_end_date, c_start_date) / 12) as yrs
      9        ,trunc(mod(months_between(c_end_date, c_start_date), 12)) as mnths
     10        ,trunc(c_end_date - add_months(c_start_date, trunc(months_between(c_end_date, c_start_date)))) as dys
     11* from t
    SQL> /
    
    C_START_DATE        C_END_DATE                 YRS      MNTHS        DYS
    ------------------- ------------------- ---------- ---------- ----------
    17/11/2006 00:00:00 21/01/2008 00:00:00          1          2          4
    21/11/2006 00:00:00 17/02/2008 00:00:00          1          2         27
    31/01/2009 00:00:00 28/02/2010 00:00:00          1          1          0
    21/06/2006 00:00:00 17/07/2008 00:00:00          2          0         26
    
  • calculation of years, months and days

    Hello

    I have to calculate the duration in years, months and days between contract_start_date and contract_end_date

    for example: Contract_Start_Date = 17 November 2006 "and Contract_End_Date = January 21, 2008"

    Hello

    have you tried the function months_between? You get the number of months between the dates, years and months is easy.
    If you just truncates the result and we add_months with it and the date of departure, you can get a date from which you can get everyday simply by calculating the difference of the end date.

    Then
    years: = trunc (months_between (end_date, start_date) / 12);
    month: = mod (months_between (start_date, end_date), 12);
    days: = trunc (end_date - add_months (start_date, trunc (months_between (end_date, start_date)));)

    It should work

    Best regards
    Wolfgang

  • How to convert MP4 to WMA files and MP3 files.

    How to convert MP4 to WMA files and MP3 files.

    Hello

    Free M4a to MP3 Converter 6.2 NEW!
    Convert AAC to MP3 and M4a to MP3
    http://www.ManiacTools.com/soft/M4A-to-MP3-Converter/

    Convert m4a to mp3 - free
    http://www.MP3-CD-converter.com/convert_mp3/free_convert_m4a_to_mp3.html

    mass convert m4p m4a to mp3 freeware
    http://www.Giveawayoftheday.com/mass+convert+M4P+M4A+to+MP3+freeware/

    Of many freeware converters
    http://www.MP3-Converter.com/mp3_converter_freeware.htm

    Free Mp3 Wma Converter V1.8
    http://koyotstar.free.fr/indexEn.html

    Free MP3 WMA WAV Converter
    http://www.nbxsoft.com/MP3-Converter.php

    Others are using Google and BING.

    -------------------------------------------------------------

    Plenty of capable edition

    Audacity - free
    http://Audacity.sourceforge.NET/

    Free Audio Editor 2011 - free
    http://www.free-audio-editor.com/

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • How to find the difference in date in years, months and days

    Hello
    I need to find the difference between 2 dates in the following way "years months days". "
    Please can help me, how can I achieve this.

    for example, in the scott schema emp table, I need to find the difference in date between sysdate and hiredate for an employee in the following way.

    12 years 7 months 4 days.

    Hello

    Please, see this post to AskTom [difference between 2 dates | http://asktom.oracle.com/pls/asktom/f?p=100:11:0:P11_QUESTION_ID:96012348060]. There is good information in this forum, for example you can also see this thread [calculation of years, months & days | http://forums.oracle.com/forums/thread.jspa?messageID=3115216�]

    Kind regards

    Published by: Walter Fernández on November 30, 2008 08:58 - adding another link

  • Calendar.setTime defines the only year, month and day, no time

    Hello

    It is more a question of JAva instead of JDeveloper, but I still hope to get some answers here. I have problems, I have a Date (oracle.jbo.domain.Date) 2008-12-12 15:21:0. What I need is a string '121521' (day, hour, and minute - DDHHMM). This should be simple, but I'm strugling with this for a while now: $. I use class schedule so I can get the values using cal.get (Calendar.DAY_OF_MONTH), cal.get (Calendar.HOUR_OF_DAY) and cal.get (Calendar.MINUTE).

    Think I tried and none of them work:
          Calendar cal = Calendar.getInstance();
              Date ldETA = (Date)loETA; // this is the oracle.jbo.domain.Date 12/12/2008 15:21:0
    
              cal.clear();
              cal.setTime(ldETA.dateValue());
             // I try getting the values here
              try {
                cal.clear();
              cal.setTimeInMillis(ldETA.longValue());
             // I try getting the values here
              }
              catch (Exception e) {}
              
              java.util.Date loD = (java.util.Date)ldETA.dateValue();
              cal.clear();
              cal.setTime(loD);
             // I try getting the values here
    I always get only 12 for cal.get (Calendar.DAY_OF_MONTH) while cal.get (Calendar.MINUTE) and cal.get (Calendar.HOUR_OF_DAY) return 0.

    Help please: (.)

    Thank you
    BB

    BB,

    oracle.jbo.domain.Date is a subclass of oracle.sql.DATE, which has a method toText() - have you tried?

    John

  • How to repeat an event every month, and that the event referred to the previous Friday if the event falls on a weekend.

    Company is paid twice a month. The 15th and the last day of the month.

    Defining the last day of the month would repeat each month, day of the last week. But how do you define the 15th with these conditions:

    If the 15th falls on the weekend, it will be Friday before the weekend. For example, May 15, 2016 falls on a Sunday, the event must be moved to May 13 instead. Is this possible?

    Thank you!

    Found the answer.

    Snow Leopard iCal - event on Friday if the Nth is a weekend/holiday?

  • How to convert a video in wmv and reduce to 2 MB for emailing

    I am doing a project for class and I was told it must be in WMV format and cannot exceed all the 2 MB.  How can I accomplish this?

    To convert video from one format to the other you
    need a conversion software.

    There are to many converters available on the net and the
    following freeware is an example:

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    Format Factory
    http://www.videohelp.com/tools/Format_Factory
    (the 'direct link' is faster)
    (the file you want to download is: > FFSetup260.zip<>
    (FWIW... installation..., you can uncheck
    ('all' boxes on the last screen)

    First, you will need to decompress the file or just open the
    Drag FFSetup260.exe out of the folder
    and drop it on your desktop. To install left click.

    Next, after the download and installation of Format
    Factory... you can open the program and
    left click on the toolbar, the "Option" button and
    "Select an output folder to" / apply / OK.
    (this is where you find your files after they)
    are converted)

    Drag and drop your video clips on the main screen...

    Select "all to WMV" / OK...

    Click on... Beginning... in the toolbar...

    That should do it...

    Good luck...

    If the size of the WMV file still exceeds the limit of 2 MB...
    Import it into Movie Maker, and publish for e-mail.

    Windows Vista-
    Publish a movie in
    Windows Movie Maker
    http://Windows.Microsoft.com/en-us/Windows-Vista/publish-a-movie-in-Windows-Movie-Maker

    Movie Maker Vista - Edition
    http://www.Papajohn.org/Vista-publishing.html

  • How to convert the number in months?

    Hi friends

    I have data in the table like this

    Month

    01

    02

    03

    04

    I want to convert in months. e, g

    01 if it should appear January

    02 if it should appear February

    What is the SQL query? Help, please.

    rgads

    with

    months as

    (by selecting '01' mnth throughout double Union

    Select '02' of any double union

    Select '03' in double union

    Select '04' double

    )

    Select mnth, to_char (to_date (mnth, 'mm'), 'Month') mnth_name

    of the month

    MNTH MNTH_NAME
    01 January
    02 February
    03 March
    04 April

    Concerning

    Etbin

    misread - must be a number

    with

    months as

    (select 1 month of all the double union)

    Select 2 Union double all the

    Select 3 in all the double union

    Select 4 double

    )

    Select mnth, to_char (to_date (to_char (mnth), 'mm'), 'Month') mnth_name

    of the month

  • How to convert images to Grayscale black and white

    I don't have a scanner.  When I need to analyze something, I place under a piece of glass and shoot with my digital camera, then transfer the file jpg on my PC.  My "scans" interpreted that way many pages of text n & B, so the jpg that results is enough grayscle; because I do not use an official copystand there are a good amount of shadow in the image.  It is quite easy to desaturate these images so there is no color in them, but there are still a lot of tweaking if I want to remove the shadows and the end upward with an image strictly B & W.  It seems to me that there should be a filter that allows me to set a threshold such that everything above the level is rendered in form of black (or white), and everything else is rendered as white (or black).  If so, what is it?  Thank you.

    Am_I_Lame? wrote:

    each pixel beyond a certain level in an image desatruated in white and the rest black

    Image > adjust > threshold for this. But I am pretty sure that is not what you want, the result will be crap.

    I would use levels to set the white and black points and then curves to increase the contrast. You can do both with curves, but endpoints are not as easy to spot there.

  • split with day, month and year in a date

    Hi all

    I have this point of view

    with (id, dt) t (select 1, to_date('02/06/2010','MM/DD/YYYY') of all the double union)
    Select 2, to_date('11/29/2001','MM/DD/YYYY') of all the double union
    Select 3, to_date('02/06/2011','MM/DD/YYYY') of all the double union
    Select option 4, double to_date('10/10/2011','MM/DD/YYYY')
    )
    --
    -end of test data
    --
    SELECT id, dt
    floor (months_between(sysdate,dt)/12) years
    , floor (mod (months_between (sysdate, dt), 12)) months
    -The day is ambiguous because of the number of days in a different month
    -you could design your own algorithm to give the desired results, but it is a good approximation
    , floor (sysdate-(add_months (dt, floor (months_between (sysdate, dt))) as dys
    t
    /
    ID DT YEARS MONTHS DYS
    ---------- ----------- ---------- ---------- ----------
    1-6 FEBRUARY 2010 5 8 22
    2 29 NOVEMBER 2001 13 10 29
    3-6 FEBRUARY 2011 4 8 22
    4-10 OCTOBER 2011 4 0 18

    As a result, 26 years old, 26 months, 91 days.


    And subtract years, MONTHS and DYS as format

    erase years, from 1 to 12 months and the days of the 1 to 30 as

    91 days = 30 x 3 + 1 = > 1 day over 3 months

    26 months + 3 months = 29 months = > 24 months + 5 months = 2 years + 5 months

    and 26 years + 2 years = 28

    desire to result: 28 years, 5 months and 1 day.

    Is there a function that give me this result from the query above?

    Kind regards

    Gordan

    Hello Gordan,.

    I understand that you are the SUM of all the lines.

    Here are two ideas:

    -1 - using a date
    (a) SUM (TRUNC (sysdate) - dt)
    I would give you the total number of days.
    (b) adding the number of days to, for example, DATE ' 1900-01-01' would give another date...
    (c) simply subtract the years 1900 and it takes several years,
    subtract 1 from the month (1-12 from January to December) and you have the number of months
    subtract 1 from the day of the month (1-31) and you have the number of days.
    It is of course 'approximate' as the months do not have the same number of days...

    -2 - using only the number of days
    Maybe you want something else, for example: the total number of days divided by 365.25 for many years, the recall divided by 30 to get the number of months, the reminder being the number of days.

    (a) SUM (TRUNC (sysdate) - dt)

    I would give you the total number of days.

    (b) Division by 365.25 (le.25 is to take leap years into account, but you can choose for example "365")

    (c) number of reminder of days (total - years * 365.25): divided by 30 is the number of months

    (d) number reminder of days (total - years * 365.25 - months * 30): gives the number of days.

    The following two options with your test data (by chance, this gives the same result in this case)

    option 1:
    with (id, dt) t (select 1, to_date('02/06/2010','MM/DD/YYYY') of all the double union)
    Select 2, to_date('11/29/2001','MM/DD/YYYY') of all the double union
    Select 3, to_date('02/06/2011','MM/DD/YYYY') of all the double union
    Select option 4, double to_date('10/10/2011','MM/DD/YYYY')
    )
    target_date AS
    (SELECT DATE ' 1900-01-01' + SUM (TRUNC (sysdate) - t.dt) FROM t trgt)
    in_pieces AS
    (SELECT TO_NUMBER (TO_CHAR (td.trgt, 'YYYY')) - 1900 y
    , TO_NUMBER (TO_CHAR (td.trgt, 'MM')) - 1 m
    , TO_NUMBER (TO_CHAR (td.trgt, 'DD')) - 1 d
    Target_date TD
    )
    SELECT "result: ' |"
    TRIM (CASE WHEN ip.y = 0 THEN NULL
    WHEN ip.y = 1 THEN "1 year"
    Of OTHER TO_CHAR (ip.y) | "years".
    END |
    CASE WHEN ip.m = 0 THEN NULL
    WHEN ip.m = 1 THEN "1 month"
    Of OTHER TO_CHAR (ip.m) | 'months '.
    END |
    CASE WHEN ip.d = 0 THEN NULL
    WHEN ip.d = 1 THEN "1 day"
    Of OTHER TO_CHAR (ip.d) | 'days '.
    END
    )
    Of in_pieces ip
    ;
    result: 28 years, 4 months and 28 days

    option 2:

    with (id, dt) t (select 1, to_date('02/06/2010','MM/DD/YYYY') of all the double union)
    Select 2, to_date('11/29/2001','MM/DD/YYYY') of all the double union
    Select 3, to_date('02/06/2011','MM/DD/YYYY') of all the double union
    Select option 4, double to_date('10/10/2011','MM/DD/YYYY')
    )
    nb_days AS
    (SELECT SUM (TRUNC (sysdate) - t.dt) n t)
    , y AS
    (SELECT Nb.n, FLOOR (nb.n / 365.25) y nb_days n. b.)
    ym AS
    (SELECT y.n, y.y, FLOOR ((y.n-y.y * 365,25) / 30) FROM a)
    ymd AS
    (SELECT ym.y, ym.m, ym.n - ym.y * 365.25 - ym.m * ym FROM 30 d)
    SELECT "result: ' |"
    TRIM (CASE WHEN ymd.y = 0 THEN NULL
    WHEN ymd.y = 1 THEN "1 year"
    Of OTHER TO_CHAR (ymd.y) | "years".
    END |
    CASE WHEN ymd.m = 0 THEN NULL
    WHEN ymd.m = 1 THEN "1 month"
    Of OTHER TO_CHAR (ymd.m) | 'months '.
    END |
    CASE WHEN ymd.d = 0 THEN NULL
    WHEN ymd.d = 1 THEN "1 day"
    Of OTHER TO_CHAR (ymd.d) | 'days '.
    END
    )
    WAN
    ;
    result: 28 years, 4 months and 28 days

    Best regards

    Bruno Vroman.

  • problem to insert only month and year instead of the full date

    select b.penjara_id, p.penj_lokasi, a.no_daftar, b.episod, b.nama1,to_char(a.trkh_mula_prl,'dd/mm/yyyy') as trkh_mula_prl, to_char(bulan_proses,'mm/yyyy') as bulan_proses,
            b.epd, b.lpd
    from prl_daftar_proses a, senarai_pesalah b, penjara p
    
    where a.no_daftar=b.no_daftar
    and a.episod=b.episod
    and b.penjara_id = p.penjara_id
    and a.setuju_jplp is null
    and a.bulan_proses between to_date(:FROM,'dd/mm/yyyy') and to_date(:TO,'dd/mm/yyyy')
    
    
    order by b.penjara_id, a.bulan_proses,a.no_daftar
    Hi, can someone help me how I can register only the month and year of the value which have full day in the database?

    for example, the date is 18/09/2012, but I want to just insert 09/2012 as a parameter. If I want to insert only one setting, I can do... But I have problem when I want to insert two parameters...

    Lina saleh wrote:
    I already try before that and he invites me error like this...
    "name of the invalid host/identification variable.

    Change the name of the connection variable to: from_date and: to_date

    Is a reserved keyword.

  • Have used Windows Movie Maker very well for months and now it stops just to work

    OK, so I had a recent problem with Movie Maker. How original is that? For months and months I used it with only minor headaches. But I can't understand it and I spent hours to friction on this problem and the search for something. All Google tell me is to make sure that my files are in a format that is accepted! Duh! I use them very well until about a month ago.

    After months of works very well, many of my clips imported media (especially. AVI and others. WMV) has decided to stop working one day. The video will not play, but the sound is very good. I re-imported the videos just to be sure, but no luck... He would not even show a thumbnail after I imported the.

    Original title: what is the problem with WMM? Help, please!
    I tried to look at the files in Media Player and got a black screen with audio complete.
    I reformatted the. AVI files (using zamzar.com) in. Format WMV, but when I tried to import those, he would give me some nonsense. In any case, I tried to defrag my drive hard as someone suggested online (I have an old computer anyway) but I don't really think it helped.
    It could be a codec problem (I don't know what would have prompted such), the Enigma is that SOME of my clips will play in the preview, but they stop working as soon as I drag them on the timeline. And I found one. WMV file in one of my old projects that will play in the panel mounting.
    I even tried to save an unfinished project to my computer (16:9 aspect ratio, high quality NTSC). But I got an error message: "WMM cannot be saved to the specified location. Verify that the original source files used in your movie are still available, that the backup location is still available, and that there is enough available disk space, and then try again. "So I tried to save the recommended"best suited"on a blank CD and it always gave me this message
    I hope this info helps (I don't know what most of it means):

    Name of the operating system Microsoft Windows XP Professional
    Version 5.1.2600 Service Pack 3 Build 2600
    Dimension E521 system model
    System Type X 86-based PC
    Processor x 86 family 15 model 79 walk AuthenticAMD 2 Mhz ~ 2004
    BIOS Version/Date Dell Inc. 1.0.3 02/10/2006
    SMBIOS Version 2.4
    System directory C:\WINDOWS\system32
    Boot Device \Device\HarddiskVolume2
    Hardware Abstraction Layer Version = "5.1.2600.5512 (xpsp.080413 - 2111).
    Total physical memory 512,00 MB
    Available physical memory 145,58 MB
    Total virtual memory 2.00 GB
    Available virtual memory 1.96 GB
    1.03 GB of swap file

    Your specifications specify that you have 512 MB of physical memory...
    It's your RAM. When video editing with an application like film
    Maker it is generally recommended that a system has a nude
    minimum of 1 GB of RAM and 2 to 4 GB would be better.

    That said, perhaps the following information will be useful:

    The most common reasons for Movie Maker problems are...

    (1) source incompatible or damaged (video clips, pictures, music files).

    (2) incompatible, corrupt or nonexistent filters (Codecs).

    (3) projects that are too big or too complex for the system resources.

    First... Open Movie Maker and go to... Tools / Options /.
    Compatibility tab and disable all filters / OK.

    Try to create your project and find out whether there is a
    improvement.

    If no improvement, return to the same settings
    and left click Restore values by default all the button / OK.

    As for file formats...

    Several formats are apparently compatible with
    Movie Maker, but the most reliable choices are:

    Photos - bmp
    Video - wmv or dv - avi
    (FWIW... DV - AVI is a specific format... it's
    doesn't mean "everything". AVI files are compatible with
    Movie Maker.)
    Audio - wav, wma, wmv

    There are to many converters available on the net and
    Some are better than others... it can be interesting to try
    experiment and see which suits you best.

    Proceed at your own risk *.

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    (1) format Factory (freeware)
    http://www.videohelp.com/tools/Format_Factory
    (the 'direct link' is faster)
    (the file you want to download is: > FFSetup270.zip<>
    (FWIW... installation..., you can uncheck
    ('all' boxes on the last screen)
    (Windows XP / Vista / 7)

    First, you will need to decompress the file or just open the
    Drag FFSetup270.exe out of the folder
    and drop it on your desktop. To install left click.

    (2) Freemake Free Video Converter (freeware)
    http://www.Freemake.com/free_video_converter/
    (Windows XP / Vista / 7)

    (3) Koyotesoft Free Video Converter
    http://www.koyotesoft.com/indexEn.html
    (2000/XP/2003/Vista/Seven)

    (4) Sothink Free Video Converter
    http://www.Sothinkmedia.com/video-converter/
    (Windows XP / Vista / 7)

    (5) SUPER © Simplified Universal Player Encoder & Renderer
    http://www.videohelp.com/tools/Super
    (the download mirror site is faster) (Windows XP / Vista / 7)

    (6) Xilisoft Video Converter
    http://www.Xilisoft.com/video-converter.html
    (not freeware but receives good reviews)
    (Windows XP (SP2 or later) / Vista / 7)

    There is a small chance that download and installation
    one of the following Codec Packs would improve the problems.

    (FWIW... it's always a good idea to create a system)
    Restore point before installing software or updates)

    Proceed at your own risk *.

    Media Player Codec Pack
    http://www.mediaplayercodecpack.com/
    (Windows XP - Vista - 7)

    K - Lite Codec Pack (full)
    http://www.filehippo.com/download_klite_codec_pack/
    (Windows XP - Vista - 7)

    Windows 7 Codec Pack
    http://download.CNET.com/Windows-7-Codec-Pack/3000-13632_4-10965840.html
    (Windows XP - Vista - 7)

    Download CCCP (combined Community Codec Pack)
    http://www.CCCP-project.NET/
    (Windows XP - Vista - 7)

    Good luck...

  • How to reach on average 24 months?

    Hello

    I put variables:

    CurrMonth = August
    CurrYear = FY10

    For the account named Avg_Biscuits in the Budget scenario, I need to match the sum of the "cookies" for periods of 24 divided by 24. So periods AFA 08-August-FY10-> Jul > divided by 24. However he jumps between the years/months and don't know how to do it. I don't want to have to define 24 different variables that they would need to be maintained and that seems to be a problem anyway. I tried @MOVSUM with no luck. Is there an average function that can do so in the months and years?

    Hello
    If you create more than subs 3 variables and update the values of those your risk could be solved.

    & PrevYear2 = 2008
    & PrevMonth2 = Jul
    & PrevYear1 = 2009
    & CurYear = 2010
    & CurMonth = August
    & PrevMonth = Jul

    Average could function as below:
    IF (not @ISMBR (Jan))
    (
    @Sumrange (AccountMember,@XRANGE (& PrevYear2-> & PrevMonth2 & PrevYear2-> Dec)) +.
    @Sumrange (AccountMember,@XRANGE (& PrevYear1-> Jan, & PrevYear1-> Dec)) +.
    @Sumrange (AccountMember,@XRANGE (CurYear-> Jan & CurYear-> & PrevMonth))
    ) / 24;
    ON THE OTHER
    (
    @Sumrange (AccountMember,@XRANGE (& PrevYear2-> & PrevMonth2 & PrevYear2-> Dec)) +.
    @Sumrange (AccountMember,@XRANGE (& PrevYear1-> Jan, & PrevYear1-> Dec))
    ) / 24;

    It should be noted that it works different in Jan as the previous month in the previous year.

    See you soon,.
    Alp

  • 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

Maybe you are looking for