Conversion of Julian date to YYYYMMDD

Hi,
The flat file has the date in Julian date format YYYYDDD. How to load it into infoprovider in the format YYYYMMDD?
Thanks.

To get the YYYY portion of the Gregorian Date, you would use the YYYY portion of the Julian Date.
To get he MMDD portion of the Gregorian Date you would start with the DDD portion of the Julian Date and start subtracting 31, 28 (or 29 in leap years), 31, 30, 31, 30, 31, 31, 30, 31, 30, and 31, successively, until you first get a result which is zero or negative. The month MM is the number of subtractions you have done, and the last positive subtraction result is the day DD.
As an example, let's use a Julian Date of 2009.278. The YYYY of the Julian Date (2009) would be the YYYY for the Gregorian Date. To get MMDD, start subtracting from 278 as follows:
278 - 31 = 247
247 - 28 (2009 not being a leap year) = 219
219 - 31 = 188
188 - 30 = 158
158 - 31 = 127
127 - 30 = 97
97 - 31 = 66
66 - 31 = 35
35 - 30 = 5
5 - 31 = -26
Since the tenth calculation was the last result that was positive, the MM is 10 and since the positive value from that is the DD or 5. This would result in a Gregorian Date of 20091005.

Similar Messages

  • Conversion from YYYYMMDD to Julian Date in BPEL

    Hi,
    My requirement is to convert date format from YYYYMMDD to Julian Date (CYYDDD) in BPEL.
    C - Stands for Century
    Would like to know a way to achieve this conversion in BPEL. Please suggest.
    Appreciate your quick help.
    Thanks
    Priyanka G

    Hi,
    I suggest you use a java activity for that... There are many examples in java on how to convert a date to julian...
    Cheers,
    Vlad

  • Conversion of Hiredate to Julian date

    Hi Gurus,
    Need help in Conversion of hiredate of emp table to Julian date...
    to_date('HIREDATE','YDDD')
    Thanks

    Hi,
    SeenuGuddu wrote:
    Hi Gurus,
    Need help in Conversion of hiredate of emp table to Julian date...
    to_date('HIREDATE','YDDD')
    ThanksIf you have a DATE column called hiredate, then you can use TO_CHAR to display it in the format you want, like this:
    TO_CHAR (hiredate, 'YDDD')Notice that there are no quotes around the first argument.
    Use TO_DATE if you are starting with a string and you want to produce a DATE. For example:
    TO_DATE ('9320', 'YDDD')or, if you have a column called hiredate_text:
    TO_DATE (hiredate_text, 'YDDD')Again, the first argument is not quoted, because it is a column name, not the literal value.
    The Julian Date is (currently) a 7-digit number. If you use some other coding system for dates, it will only cause confusion if you call it "Julian".
    There's already enough confusion between "Julian Date" and "Julian Calendar" (which Oracle uses for dates up to 1582).

  • Julian Date Conversion

    I've been trying to figure this out for a few days now.
    For work, I'm trying to show that I am willing to keep track of our cigarette inventory and each carton's expiration date. So, I've figured out how to read carton codes for products from Philip Morris. But I want to be lazy (lol) and not have to figure out what month, and then day of that month, each carton was manufactured in from the Julian Date provided on the carton.
    My question is, how do I get Numbers to read "2009055" and convert it to "02/23/2009"? If there is a way and it requires a different input syntax, I'll be more than happy to change over to that instead. I haven't been able to figure it out. I'm sure there's someone out there who can figure this one out. I found instructions on how to do it in Microsoft Excel. I'm sure Numbers '08 can manage it somehow, right?
    Thanks for your time,
    -- Evan

    Evan,
    I'll share my solution with you on two conditions. First, I'd like to see the solution you found for Excel. Second I'd like you to promise to smoke only in your car with the windows up.
    With your input in Column A, the conversion expression is:
    =DATE(LEFT(A,4),1,1)+RIGHT(A,3)-1
    By the way, 2009 is not a leap year, and in this date format I believe the convention is that January 01, 2009 would be "2009001", so 2009055 converts to "02/24/2009", not "02/23/2009".
    I don't have Numbers 08 on this computer, so my test of the expression was done on Numbers 09, but I'm pretty confident that the result will be the same.
    Regards,
    Jerry

  • 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
    Thanks

    Hi,
    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

  • JDCB Driver not doing data transformation on Julian dates and amount fields

    Hi All,
    In our newly installed BI Publisher instance (10.1.3) is not doing any data transformation on JDE Julian dates and Decimals. I've read that these field values are supposed to be converted automatically. Is there some setting in the JDEJDBC driver connection that makes this happen?
    While working with Oracle support I've found the following:
    1. Beware of white space in the collection string.
    2. Make sure the JDE user logging in goes straight to JDE and has full view privlidges on the tables you are selecting on.
    3. Parameters are not supported by the JDEJDBC Driver -- this pretty much renders this application worthless. Does anyone know of any workarounds?
    Database IBM DB2 UDB version 6.1
    JDE Version: World A7.3
    Edited by: enorton on Jun 30, 2010 2:02 PM

    Lets try com.jdedwards.as400.access.JDEWJDBCDriver (download from oracle support)
    JDEWorldJDBC.jar There is inbuild date conversion and decimal shift.

  • Julian dates

    I have a file that reads in date
    MMDDYYYY from the user.
    I need to pass this parameter somewhere to convert it
    into a julian date. I will later use this julian date to query a database based on the start and ending date criteria.
    How do I make the conversion?
    RycherX

    http://forum.java.sun.com/thread.jsp?forum=31&thread=198725
    http://forum.java.sun.com/thread.jsp?forum=57&thread=120630
    http://forum.java.sun.com/thread.jsp?forum=31&thread=56572
    http://forum.java.sun.com/thread.jsp?forum=256&thread=44652
    http://forum.java.sun.com/thread.jsp?forum=31&thread=192366
    Here are a few threads with similar questions. It took about 30 seconds of searching to find these. If you don't find the right answer, please ask again and provide any code you have already started.

  • Need Func Mod that provides Julian Date

    Hi,
    Anyone aware of a Function Module that will provide Julian dates?
    Thanks.

    Hi,
    Heres a small piece of code that will convert date into julian date and vice versa.
    YYYYMMDD to JULIAN FORMAT
    *Convert Date into Julian format yynnn
    report z_date_to_julian.
    data : v_i type i.
    data : v_n(3) type n.
    data : v_julian(5) type n.
    data : date1 like sy-datum.
    parameters : p_date like sy-datum.
    concatenate p_date(4) '0101' into date1.
    v_i = p_date - date1 + 1.
    move : v_i to v_n.
    concatenate p_date+2(2) v_n into v_julian.
    write :/ 'Date -',  p_date.
    write :/ 'Julian -' , v_julian.
    JULIAN DATE to YYMMDD format
    parameters : p_julian(5) obligatory.
    move : p_julian(2) to v_yy.
    move : p_julian+2(3) to v_days.
    do 12 times.
      move : sy-index to v_mm.
      move : v_mm to v_month.
      move : v_yy to v_butag.
      call function 'NUMBER_OF_DAYS_PER_MONTH_GET'
           exporting
                par_month = v_month
                par_year  = v_butag
           importing
                par_days  = v_days_month_n.
      move : v_days_month_n to v_days_month.
      v_diff = v_days - v_days_month.
      if v_diff le 0.
        move : v_days to v_dd.
        concatenate v_yy v_mm v_dd into v_output.
        exit.
      else.
        v_days = v_diff.
      endif.
    enddo.
    write :/ 'Input' , p_julian.
    write :/ 'Output', v_output.
    Hope this is useful..
    Reward if helpfull...
    Cheers,
    Sowjanya.

  • Convert string (in a Julian Date format) to a date in CR XI Release 2

    How do you convert a string field  entered in a database as a Julian date " 10109 , 09008. ,,," to
    print on a report as  date?
    09008 would be 01/08/09
    10109                 04/19/10

    A small correction to Brian's formula:
    NumberVar myYear;
    NumberVar myDays;
    myYear := ToNumber( {table.JULIAN} [1 to 2]);
    myDays := TONUMBER({table.JULIAN} [3 to 5]);
    (Date (myYear, 1, 1) + myDays) - 1;
    The result for '09008' will be 01/08/9, by adding ToText, you can get the result in the desired format of 01/08/09.
    totext((Date (myYear, 1, 1) + myDays) - 1, "MM/dd/yy");
    Here is an alternate solution without having to create variables:
    totext(dateserial(tonumber(X[1 to 2]),1,tonumber(X[3 to 5])),"MM/dd/yy");
    where X is the julian date in string.
    Edited by: Sanjay Kodidine on Apr 20, 2010 8:25 AM

  • How to Convert Normal XML date or Oracle date to JDE Julian Date

    We can do a simple mathematical step in XSLT :
    'xpath20:format-dateTime(xpath20:current-dateTime(),"[Y0001][d001]") - 1900000'
    Or in SQL :
    Select to_char(sysdate,'YYYYDDD')-1900000 from dual;
    Julian Date is: Year in 4 digits, YYYY, and Number of days in 3 digits, DDD
    JDE Julian Date is Julian Date -1900000 (ie it counts Julian date from 1900 Year)
    "[Y0001][d001]” returns date in Year in 4 digit + number of days in 3 digits. This is the Julian date.
    Subtracting 1900000 ( ie YR ’1900’ & DAY ‘000’) gives the required JDE Julian Date.
    Edited by: prakash.pankaj on Jul 8, 2011 2:13 PM
    Edited by: prakash.pankaj on Jul 8, 2011 4:02 PM
    Edited by: panks on Jul 20, 2011 3:43 PM

    Hi,
    getTime() (in Date) will give you that date in milliseconds since January 1, 1970 00:00:00 GMT.
    To my knowledege, this is the same as Unix date format.

  • Conversion of a data object of type "C" to type "l" is not supported

    Experts:
    i have below code in my FM; defined as remote-enabled module.
    when i execute i get the error analysis as:
      You attempted to move one data object to another.
    This is not possible here because the conversion of a data object
      of type "C" to type "l" is not supported.
    This at the line    move <FS2> TO <wwa_mdm_name_value_pair>-VALUE .
    what are the steps to debug this?  Thanks!
      DATA: tt_mdm_name_value_pair_table TYPE mdm_name_value_pair_table.
      FIELD-SYMBOLS : <wwa_mdm_name_value_pair> LIKE LINE OF tt_mdm_name_value_pair_table.
      FIELD-SYMBOLS <FS1> TYPE ANY.
      FIELD-SYMBOLS <FS2> TYPE any.
      data:st_mdm_name_value_pair type mdm_name_value_pair.
      assign  st_mdm_name_value_pair to <wwa_mdm_name_value_pair>.
    assign st_mdm_name_value_pair-code to <FS1>.
    assign st_mdm_name_value_pair-value to <FS2>.
      clear wa_ZSTRESULT.
      loop at T_UPDATE into wa_ZSTRESULT.
        assign wa_ZSTRESULT-field to <FS1>.
        <wwa_mdm_name_value_pair>-CODE = <FS1>.
        assign wa_ZSTRESULT-VALUE to <FS2>.
        move <FS2> TO <wwa_mdm_name_value_pair>-VALUE .
        append <wwa_mdm_name_value_pair> to tt_mdm_name_value_pair_table.
      endloop.

    resolved using GET REFERENCE.. code looks as below:  Thanks!
      DATA: tt_mdm_name_value_pair_table TYPE mdm_name_value_pair_table.
      FIELD-SYMBOLS : <wwa_mdm_name_value_pair> TYPE LINE OF mdm_name_value_pair_table.
      FIELD-SYMBOLS <FS1> TYPE ANY.
      FIELD-SYMBOLS <FS2> TYPE DATA.
      TYPES t_dref TYPE REF TO DATA.
      DATA dref TYPE REF TO DATA.
      DATA: TT_UPDATE TYPE ZTYRESULT.
      FIELD-SYMBOLS : <WA_UPDATE> LIKE LINE OF TT_UPDATE.
      data:   st_mdm_name_value_pair type mdm_name_value_pair.
      assign  st_mdm_name_value_pair to <wwa_mdm_name_value_pair>.
    assign st_mdm_name_value_pair-code to <FS1>.
    assign st_mdm_name_value_pair-value to <FS2>.
      clear wa_ZSTRESULT.
      TT_UPDATE = T_UPDATE.
      loop at TT_UPDATE assigning <WA_UPDATE>.
        assign <WA_UPDATE>-FIELD to <FS1>.
        <wwa_mdm_name_value_pair>-CODE = <FS1>.
        assign <WA_UPDATE>-VALUE  to  <FS2>.
        GET REFERENCE OF <WA_UPDATE>-VALUE INTO dref.
    *    MOVE dref TO <wwa_mdm_name_value_pair>-VALUE.
        <wwa_mdm_name_value_pair>-VALUE = dref.
        append <wwa_mdm_name_value_pair> to tt_mdm_name_value_pair_table.
      endloop.

  • How to get the today's julian date in java?

    how to get the today's julian date in java?
    hi can any one tell me how to get the todays julian date using Calender class or GregorianCalender class....
    Julian date for 2006.November.01 AD 05:54 PM : 2454041.0
    i have tryied with
    calJ.setGregorianChange(new Date(Long.MAX_VALUE));
    System.out.println(sdf2.format(calJ.getGregorianChange()));
    thanks
    Tushar
    Message was edited by:
    lad_tushar

    thanks a lot....for intrest....
    I have found some details about the Julian calendar as follows:
    The Julian date for 2006: JAN: 01:12:01:59 is 2453737.00138
    245 represent the year digits for year 2006
    3737 represent the date fir 1 Jan
    .00138 represents the time for 12:01:59
    Julian date change as per every day 12 noon it increase one digit in it.
    As per ref from
    http://www.aavso.org/observing/aids/jdcalendar.shtml
    Also chk this calendar where Julian date is 20. October 2006 for 02 November 2006
    As per ref from
    http://www.calendar.sk/julian_calendar-en.php
    I have tried the pure �GregorianCalendar� class from jdk1.4 API and its setGregorianChange method but not getting as per the expected Julian date format. Using the �setGregorianChange()� i have setting the cutover date to Long.MAX_VALUE it means GregorianCalendar now have to act as per the Julian calendar ...so after setting the cutover date it return me changed date using �getGregorianChange()� but that was not the Julian date of the current date...as expected or as per above both scenario. Even though the last two digits are nowhere equal to the actual Julian date.
    Program
    GregorianCalendar cal = new GregorianCalendar();
    cal.setGregorianChange(new Date(Long.MAX_VALUE)); // setting the calendar to act as a pure Julian calendar.
    // cal.set(Calendar.DATE, new Date().getDate()); // seting the current date
    // Date todayJD = cal.getGregorianChange(); // getting the changed date after the setGregorianChange
    Date todayJD = cal.getTime(); // getting the calculated time of today�s Julian date
    SimpleDateFormat sdfJulianDate = new SimpleDateFormat("yyDDD");
    SimpleDateFormat sdfJuliandayOfYear = new SimpleDateFormat("DDD");
    System.out.println("today Date = " + new Date());
    System.out.println("Today as julian date = " + sdfJulianDate.format(todayJD));
    System.out.println("Today as day of year = " + sdfJuliandayOfYear.format(todayJD));
    OUTPUT:
    USING : Date todayJD = cal.getGregorianChange();
    Today Date = Thu Nov 02 15:17:05 IST 2006
    Today as julian date = 94229
    Today as day of year = 229
    USING : cal.set(Calendar.DATE, new Date().getDate());
    Today Date = Thu Nov 02 15:19:22 IST 2006
    Today as julian date = 06319
    Today as day of year = 319
    USING : Date todayJD = cal.getTime();
    Today Date = Thu Nov 02 15:17:59 IST 2006
    Today as julian date = 06306
    Today as day of year = 306
    There is one another concept i found to get the Julian day of the year as per the Julian day chart mention on nasa site (http://angler.larc.nasa.gov/armsgp/JulianDayChart.html) and i m getting the moth of the year that is 306 for nov 02 2006 using getTime() method in above code then the out put is right for Julian day. But it was not as per the expected Julian date format. So in conclusion we can only able to retrieve the day of year for the Julian calendar. hope their will be a solution for this problem in java api ....else we allways have to depend upon the third party api that was not accepteble some times.....
    Kindly chk chart on the site
    http://angler.larc.nasa.gov/armsgp/JulianDayChart.html
    http://weather.uwaterloo.ca/julian.html
    http://www.fs.fed.us/raws/book/julian.shtml
    Thanks,
    Tushar Lad

  • How to append date in YYYYMMDD format in .par file for export

    Hi,
    Database Version: 10.2.0.4
    OS: AIX
    I have an export script which reads .par file and executes "exp" to export schema.
    I would like to add date in "YYYYMMDD" format for the dump file like this
    owner=scott file=/exports/scott_${`date '+%Y%m%d'`}.dmp feedback=10000
    I know above statement will not help, but I am giving it as example on what I want to achieve.
    I want the file name as =/exports/scott_20120712.dmp
    Thanks
    Sarayu

    user13312943 wrote:
    Hi,
    Database Version: 10.2.0.4
    OS: AIX
    I have an export script which reads .par file and executes "exp" to export schema.
    I would like to add date in "YYYYMMDD" format for the dump file like this
    owner=scott file=/exports/scott_${`date '+%Y%m%d'`}.dmp feedback=10000bcm@bcm-laptop:~$ export YYYYMMDD=`date '+%Y%m%d'`
    bcm@bcm-laptop:~$ echo $YYYYMMDD
    20120712
    bcm@bcm-laptop:~$
    owner=scott file=/exports/scott_${YYYYMMDD}.dmp feedback=10000

  • Conversion of user date to system format

    i have a problem in conversion of user date.
    i use a function module in which the user have to give the date as input. he can give the date in any format like MM/DD/YYYY or DD.MM.YYYY etc . how to convert the given date into the system date.

    hi,
    use FM CONVERT_DATE_TO_INTERNAL
    cheers,
    sasi

  • Function module to convert calender date to Julian date format

    Hi,
    Is there any FM which can convert Calendaer Date to <b>Julian Date</b> format?
    Thanks.
    Regards,
    Madhu

    It is not a func mod... but it is pretty straight forward.
    data: julian_day(3) type n,
    date_aux type d,
    date_I_need type d.
    first day of the year
    concatenate date_I_need(4) '0101' into date_aux.
    julian_day = date_I_need - date_aux.
    julian_day = julian_day + 1.

Maybe you are looking for

  • Scanning actual size hi res images

    I am cross-posting this message since I'm not really sure where I should post it. I recently switched from a PC to the macbook pro and am using an HP photosmart C7100 series scanner. I cannot figure out how to scan images at actual size using this sc

  • Why not leave remote app for 4.2.1?

    Hi there, with my family i own 3 ipod touches, 3 shuffles, and two iphones. I own two houses where i have set up a central computer to run itunes with airport expresses all over my houses to control speakers and music through the "remote" app. I am h

  • Data retrieval from N95 8GB/Restoring NGage games ...

    Hi everything from my Nokia got deleted when I was deleting items from the LifeBlog.  I did a recovery from it using recovery software, however some items were retrieved no problems but some video files and pictures are unable to open or to view. I h

  • PO release by approving officer

    Dear All, Good Day! How can i config release strategy with 2 approving officer using authority matrix 1. 1st approving officer release up to 500 thousand 2. 2nd approving officer will also released po if more than 500 thousand Request to please expla

  • Update error U44M1P7

    Hello, C,ant update my adobe suite, got this message (Extension Manager 6.0.7 Update Installation failed. Error Code: U44M1P7)