Date Conversion from Julian to mm/dd/yy

Does exists a java function that allow me to convert a date-string in Julian format to a string mm/dd/yy and viceversa?
Thanx a lot in advance!
aigor

import java.lang.*;
import java.util.Date;
import java.text.SimpleDateFormat;
public class DateEx1
String dateString = "2002032";
SimpleDateFormat julianDF = new SimpleDateFormat("yyyyddd");
SimpleDateFormat slashLongDF = new SimpleDateFormat("dd/MM/yyyy");     
static public void main( String[] args ) {
try {
Date inDate = julianDF.parse(dateString);
System.out.println("Date is "+slashLongDF.format(inDate));
catch (Exception ex) {
System.out.println("Error: "+ex);
regards
Fintan

Similar Messages

  • How do i do data conversion from 11.0.3 to 11.5.10?

    Hi to all,
    If any body have any approach how to do data conversion from 11.0.3 to 11.5.10 release?
    Thanx in Advance

    ajones2 wrote:
    I got the update to work but there seems to be one thing that does not work
    I'm anxious to install 4.5 as well because I understand the music player features a sound equalizer, but I believe it's not prudent to get it from somewhere other than your carrier.  I could be wrong, but I think that each carrier tweaks the OS in some fashion...
    Does your 4.5 have the sound equalizer ?
    George from Bedford, TX
    8120 on T-Mobile with BB Unlimited Email+Internet but
    without the BlackBerry Enterprise service

  • GL Data Conversion from Legacy to Oracle EBS

    Hi All,
    I am tasked with converting legacy data into GL. I have worked on other conversions like supplier, AR and AP conversions but never worked on GL conversion, so I don't know how and where to start, what are the pre-requisites for entering data into gl_interface table how to ensure that data is correct in the .csv file etc.
    Kindly request you all to guide me in right direction. Hope to hear from you all very soon!!! :)
    Regards

    Hi,
    When you talk about GL-Data it is the trial balance to be loaded from legacy to oracle applications.
    You can use Web-ADI to upload it ,the check list are
    The balance for each account comibnation in the legacy system to be mapped to GL-Oracle code combination balance
    With respect to open AR, AP Invoices if the invoices are converted using a control account for migration in GL then
    the the balance transfered from AP,AR need not be reversed in GL from the source receivables and payables.
    In case if the same account combination are for migrating the balances from AP,AR to GL ..Then the balances transferred from AP,AR should be reversed ..so that it does not affect the TB-GL-Balance
    Finally ensure that the balance for the TB-tallys with your legacy system and upload it using Web-ADI ,import and
    review and post it.
    Hope this points helps your GL-Data conversion.
    Regards,
    Ramaa

  • Date conversion from Excel to the SAP format

    Hi,
    I have created a BDC program which uploads daat from Excel sheet.
    There is a date field also, the format of which can be any as per the end user (it will be one of those allowed by SAP).
    However, the file will be used for execution by another user who may have a date setting which is different than that from the one in Excel.
    Eg. End User's date format: DD.MM.YYYY, SAP User's date format: MM/DD/YYYY
    So, how do I convert the date format from excel to the format which will be accepted by the transaction during the recording?
    Regards,
    Dave

    Hi Dave,
    I have faced the same issue while uploading the date to the bdc.
    if ur date format is DD.MM.YYYY in the excel file, first of all you need to change this to dats format ie YYYYMMDD ie character8 format and pass to the bdc, it will automatically convert to sap format
    ie you need to convert splitting at .
    data lv_date type char10,
            lv_dd type char02,
            lv_mm type char02,
           lv_yyyy type char04,
    v_date type char08.
    lv_date = '30.12.2011'.
    split lv_date at '.' into lv_dd lv_mm lv_yyyy.
    if strlen(lv_dd) lt 2.
       concatenate '0' lv_dd into lv_dd.
    endif.
    if strlen(lv_mm) lt 2.
       concatenate '0' lv_mm into lv_mm.
    endif.
    concatenate lv_yyyy lv_mm lv_dd into v_date.
    "Please use the variable V_DATE to populate to ur bdc"
    Edited by: Rahul Babukuttan on Aug 11, 2011 5:35 PM

  • Date Conversion from GMT to Local and Local To GMT considering DST.

    Hi,
    I have a application which displays the time in GMT across all the screens,and saves in Local/Default TimeZone as application would be deployed in europe and India.I have written a utility which does the conversion.
    I just want to know that how to handle the Daylight Saving Time[DST] as we are taking the data from database and converting it to LocalTime Zone.This works fine but what would happen if the sever time is changes due to DST.There would be problem between the object saved before the DST and after DST because we are simply converting stored time to GMT to show on the screen.
    Please share if you some solution/suggestions.
    Thanks.
    Akash.

    YoungWinston wrote:
    jschell wrote:
    That statement is phrased oddly.
    A java.util.Date uses a UTC offset with millisecond resolution.
    A jdbc driver converts that value into a "correct" value for the target database.And from.
    The form that is stored in the database is entirely database dependent. The actual form stored in the database can take many forms.True, but it is highly likely to be an offset from some "epoch" (Progress, for example, uses 00:00:00 1/1/-3714 UTC as I recall, and has 1-second granularity).Yes but as I said the phrasing was odd. A timestamp, by definition, must be an offset of something. Doesn't matter how it is represented. After all the year 2009 is an offset in the Gregorian calander.
    However in terms of actual storage the way it is stored is unlikely to be similar to what Java does. As examples neither Oracle nor MS SQL Server uses a single numeric offset.
    It might not even have a concept of timezone.Again true, although I've yet to come across one; and since OP is only concerned about the timezone in Java I'm not quite sure how relevant that is.
    Relevant in terms of the description in terms of what java does, what the database does and how it gets from java to the database.
    I would also expect any JDBC driver that cannot translate to or from a Java date correctly to document the fact in 60-point bold type, since it's a violation of the implied contract of ResultSet.getDate().Except that depends on your definition of "correct".
    Examples of that
    - Oracle doesn't have millisecond resolution at all in its common format.
    - MS SQL Server doesn't have the same resolution as java, instead there is an odd resolution (one three-hundredth of a second).
    - MS SQL Server doesn't have timezones, so if you don't take care and your data crosses timezones the timestamp will be different.
    The drivers will not warn you of things like that. At least not that I have seen.
    Format for Oracle.
    [http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:77562635789106]
    Format for MS SQL Server
    [http://msdn.microsoft.com/en-us/library/aa258277(SQL.80).aspx]

  • Date conversion from YYYYMMDD to DD.MM.YYYY

    Hi,
    I'm trying to load some data from a flat file into BW. I have a date column in the CSV file that has the date in YYYYMMDD format. when I load it into Bw, I want to change the format to DD.MM.YYYY .
    I have written a small routine that should do this, but it doesn't seem to work.
    data:v_date like sy-datum,
    v_date1(10) type c.
    Concatenate v_date+6(2) '.' v_date+4(2) '.' v_date+0(4) into v_date1.
    RESULT = V_DATE1.
    The result of this routine is YY.YYMM.DD instead of DD.MM.YYYY.
    Can anyone tell me where I'm going wrong?
    Thanks
    Sam

    Hi Keshu,
    When I add the loop to my code, it doesn't seem to work. It gives me the following error:
    does not match the user-dependent date format --> long text
    Diagnosis
    does not correspond to the date format that is assigned to the current user ASDSAD.
    System Response
    The date cannot be converted; the process was terminated.
    Procedure
    Enter the conversion exit RSDAT for automatic date format detection.
    Any suggestions?

  • Data conversion from 212 format

    I found a problem during conversion data.
    I have a file which contains ASCII characters (in fact they're look
    like ASCII on any editor) . I have to convert them to integer but I
    know that data are organised into pairs of 12bit numbers packed into
    byte triplets (format 212).
    I made some vi (which convert 2 following ASCII characters to binary,
    then divide them to pairs of 4bits, then some rotation etc..) but the
    whole conversion takes too much time (64kb file conversion is taking
    approx. 1minute).
    Thank you for any suggestions,
    Michael ([email protected])

    Dear Michal,
    I hope this vi work faster.
    Input: 3bytes, data type unsigned int (U8)
    Output: 2 values, data type integer. (INT16)
    of course read all file to memory. Don't read everytime from file by 3
    bytes.
    Deniss
    ps. vi i send by e-mail.
    "Michal Szaj" wrote in message
    news:[email protected]..
    > On Wed, 18 Sep 2002 02:27:25 GMT, Greg McKaskle
    > wrote:
    >
    > >This is one of those things that is quite sensitive to how it is coded.
    > > If you make your VI available, others, including myself can give you a
    > >hand with speeding it up.
    > >
    > >As for guessing at what might be going on, first look at the array wire.
    > > If you are using locals or property nodes to access the a
    rray, that is
    > >the cause. If the array is written to a global and later accessed via
    > >the global, that is causing it.
    > >
    > >I suspect that the bit manipulations on 64K should take something like a
    > >few seconds.
    > >
    > >Greg McKaskle
    >
    > Thank you for your support.
    >
    > In this case I have only one vi and I don't use any global/local
    > variables.
    > At the beginning of the vi I load all text character from file to
    > memory and then I'm making further operations.
    >
    > If it helps I can send the vi with data file.
    >
    > Thnx,
    >
    > Michael ([email protected])

  • Data conversion from legacy : through BOM or recipe for a process industry?

    Hi all
    I am working on  data migration document for BOM , ROUTING, PROD VER. My question is whether during migration from legacy we should first migrate the Recipe and add the comp no for creating BOM in mass creation , Or that we should bring the BOMs directly from the legacy? Which method is better from strategic point ?

    Hello,
    for migration into CRM I would suggest the 'XIF-Interfaces'; these are interfaces provided in CRM for connection to external systems. I'm not sure if this will cover all objects mentioned above, but at least some of them should exist.
    Some information about existing interfaces can be found in the integration repository under http://ifr.sap.com/index.html; from the start screen first select 'Enter the repository' and then have a look under 'generic components' and 'SAP CRM'.
    Regards, Katja Ohliger

  • Date conversion from selections creen

    i need to convert the date input received from selection screen  which is in the format (YYYYMMDD) into a format which is of one date field type in some table in order to check the conditions in where clause..
    can any one pls help me with this
    Also how to do the validations for the date field entry in the selection screen

    Use T.Code --> SU3; go to defaults & maintain your <b>date format</b> there.
    Reward Points if it helps,
    Regards,
    N

  • Data conversion from legacy to SAP

    Hi
    I am put on covnersion of legacy data and given options to use the one of the following tools
    LSMW
    CATT
    DTW
    I am new to all this. I have to migrate the following data
    GL Master
    GL Open Balance
    AP Master Data
    AP Opn items
    Fixed Asset Master
    Fixed Asset Balance
    Proft Centers Master Data
    cost Center Data
    Can youspecify which of the tools is most suitable for the conversion in each case?
    please can anyone reply?
    EMENEM

    CATT is not a Data Uploading tool. It will work till 4.7EE.
    You cannot see CATT after 4.7EE.
    If the Data is bulk then Go for BDC (Batch data Communication) Else use LSMW (Legacy System Migratration Workbench)
    again it Depends on your Requirement and your Perfectness.

  • Julian Date Conversion (Dublin Julian)

    Hi,
    I'm working with BO Designer and am connecting to an AS400 database that uses Dublin Julian for the date field.  I'm trying to get the Dublin Julian format to the YYYY-MM-DD format.  Currently, the Dublin Julian is formatted as a 5 digit number field.  For example, 2011-01-31 would be represented as 40574.  I believe the epoch, or start count day for the Dublin Julian day fell on Sunday, December 31, 1899.  Can anyone help me with this calculation within Designer?
    Thank you,
    Tyler

    You should be able to convert the 5 digit integer to a date by using the date function within the Crystal Reports Designer tool.  The formula could look like this:
    date(.)

  • Data conversion from I32 to U8

    Hello,
    I have Data in I-32 ( 1D-Array 32 Bit)  and I want to convert it into U8 ( 1D-Array 8 Byte) how I can doing that with Labview? 
    BR

    Hello, I have Lin Communication with RS232. At first I have Data with RS232-Write sent data [85.,125,23,2,39,5,255,255,255,255,186] so the Input ist a string in ASCII- Form. Data to send is 8 bit Integer so I convert the data at firt to I-32 then I use Convert number to Hexdecimal string.
    With RS232 I try to get the answer, But the output string[553c17022705FFFF] so I try to to make from this string an Array [55,3C,17,02,27,05,FF,FF] and then I convert it with Hexdecimal string convert to Number in I32, then to U8 because, with data to rec and massage fram is in U8.
    My problem is: to get the Data rec I have to use the Array-Subset where is the the array is the massage frame and the index is the message size from Data to send  + 1 = 12 .
    My resut in data rec is array with only the first value[55,3C,0,0,0,0,...] and the other value is zero.
    So i don´t know wher ist the error? Can you help me
    The result in the Frontpanel is:
    Message_Frame: 55,7d,BA,55,7D,55,FF,FF,0,0,0
    Data_rec is: 55,7D,0,0,0,0,0,0,0,0,
    I think I have problem with convert but i can not see the erorr

  • Date Conversions from Tririga

    Post Author: TinaReifer
    CA Forum: Formula
    My question is in regards to the Crystal Reporting XI & TRIRIGA Real Estate Contract Manager.
    I am directly accessing the live databases from Tririga to Crystal Reporting XI and attempting to pull dates.  In doing so the data is coming in as a string of numbers, i.e., 1,214,546,400,000.00 for 06/28/2007.  I have attempted many scenarios/formulas, with no success.
    Can anyone please tell me what formula you think would work in this scenario to convert to MMDDYYYY?
    Thank You,
    Tina Reifer

    Post Author: TinaReifer
    CA Forum: Formula
    Thank you for taking the time to look at this post & your response.  
    My apologies, I grabbed the wrong date: 
    1,214,460,000,000.00 = 06/26/2008
    1,214,546,400,000.00 = 06/27/2008
    1,214,632,800,000.00 = 06/28/2008
    1,214,719,200,000.00 = 06/29/2008
    1,183,010,400,000.00 = 06/28/2007
    Tina

  • Date conversion from mm/dd/yyyy to 'yyyymmdd'

    Hi,
    I want to convert the 'mm/dd/yyyy' to 'YYYYMMDD'.
    l_endlate = '12/17/2006'
    gw_flatfile-zzenddate format is 'YYYYMMDD'
    The following function module has error.  I think the dype is not right.  What should I put there?   Or do you have better suggestion?
        CALL FUNCTION 'CONVERT_DATE_TO_INTERN_FORMAT'
          EXPORTING
            datum = l_enddate
            dtype = 'DATS'
          IMPORTING
            idate = gw_flatfile-zzenddate.
    Thanks,
    Helen

    Hi,
    You can use the following code:
    *-Local variables-
      DATA: lf_length TYPE i,
                ex_date TYPE char10,
                in_date TYPE begda
    *-Local constants--
      DATA:lc_8 TYPE char1 VALUE '8',
           lc_9 TYPE char1 VALUE '9',
           lc_10 TYPE char2 VALUE '10',
           lc_0 TYPE char1 VALUE '0',
           lc_limit TYPE char1 VALUE '/'.
      lf_length = STRLEN( ex_date )."Length of the external date field.
      IF NOT ex_date CA lc_limit.
       MESSAGE 'wrong format' TYPE 'E'.
      ENDIF.
      CASE lf_length.
        WHEN lc_8.
          IF ex_date1(1) EQ lc_limit AND ex_date3(1) EQ lc_limit.
            CONCATENATE ex_date+4(4) lc_0 ex_date(1)
            lc_0 ex_date+2(1) INTO int_date.
          ENDIF.
        WHEN lc_10.
          IF ex_date2(1) EQ lc_limit AND ex_date5(1) EQ lc_limit.
            CONCATENATE ex_date+6(4) ex_date(2)
             ex_date+3(2) INTO int_date.
          ENDIF.
        WHEN lc_9.
          IF ex_date1(1) EQ lc_limit AND ex_date4(1) EQ lc_limit.
            CONCATENATE ex_date+5(4) lc_0 ex_date(1)
             ex_date+2(2) INTO int_date.
          ELSEIF ex_date2(1) EQ lc_limit AND ex_date4(1) EQ lc_limit.
            CONCATENATE ex_date+5(4) ex_date(2) lc_0
            ex_date+3(1) INTO int_date.
          ENDIF .
      ENDCASE.

  • Date conversion from 20071231 into December 31, 2007

    Hi All,
    Can anyone knows a FM that converts a date like sy-datum 20071231 into wordings like December 31, 2007.
    Thanks...
    Regards,
    JC

    JAycee
    Right solution for you requirment,
    DATA :ws_date(25),
          v_num type i,
           v_no1 type i,
          v_no2 type i.
    CALL FUNCTION 'CONVERSION_EXIT_LDATE_OUTPUT'
      EXPORTING
        input         = sy-datum
    IMPORTING
       OUTPUT        = ws_date
    v_num =  strlen( ws_date ).
      v_no1 = v_num - 8 .
      v_no2 = v_num - 4.
    CONCATENATE ws_date3(v_no1) ws_date0(2) ',' ws_date+v_no2(4) into ws_date.
    write : ws_date.
    Don't forget to reward if useful...

Maybe you are looking for