Covert mm/dd/yyy to mm/dd/yyyy

Hi,
Could some one help me to understand on how to convert 01/15/2010 (mm/dd/yyyy) to 15/01/2010( dd/mm/yyyy) in oracle.
Regards,
Cool

May be you are looking for TO_CHAR
SELECT TO_CHAR(TO_DATE('01/15/2010','MM/DD/YYYY'),'DD/MM/YYYY') FROM dual;G.

Similar Messages

  • How can I change the formate of @today from (MM/dd/yyy) to (dd-MM-yyyy)?

    I am in openscript, using a settext commend - .setText("{{@today(MM/dd/yyyy), 10-02-2011}}}}"); is anyone know how can I change the formate of @today from (MM/dd/yyy) to (dd-MM-yyyy)?
    I went to Java Code tab and tried to use - new SimpleDataFormat("dd-MM-yyyy").format(new Date()); but not successful. Any help will be appreciated.
    Katherine

    Hi,
    you can display the date format in dd-mm-yy by using the below Java code.
    First import the bellow java classes.
    import java.util.Date;
    import java.text.SimpleDateFormat;
    //and add bellow code in run() function
         //************ Display Date and Time *************
         Date date_format=new Date();
         SimpleDateFormat dateFormat = new SimpleDateFormat("dd-mm-yyyy");// HH:mm:ss");
         String Exec_Time = dateFormat.format(date_format);
    //output statement
    info("Today's Date: "+Exec_Time);
    I can able to add the screenshot of this output here, so if you need any other information please write to me.
    Regards,
    MRSN

  • Subroutine in sapscript for net due date

    Hi,
    This is the first time I am creating a subroutine for sapscript and I could not get it to work. I need to calculate the net due date using the baseline date plus cash discount days. But the form is just printing out 0000000. I am just trying to extract one due date here but I will have to get it for all line items then sort descending to get the latest one. Can anyone help me to see the gap why this is not working?
    In the sapscript I have the following:
    DEFINE &BASEDATE& = &REGUP-ZFBDT&
    DEFINE &PAYTERMS& = &REGUP-ZBD1T&
    PERFORM NET_DUE_DATE IN PROGRAM Z_SAPSCRIPT_FUNCTIONS
    USING &BASEDATE&
    USING &PAYTERMS&
    CHANGING &DUEDATE&
    ENDPERFORM
    In program Z_SAPSCRIPT_FUNCTIONS
    Thanks in advance!
    Cholen

    Hi Raju!
    I am really getting close! I did the conversion for all variables, however for VBLNR, it does not work. It gives leading zeroes but the value starts with a 'P' before the zeroes and the numeric value. I tried to remove that from the where clause and my select finally got something. However the output on the form is in the internal format. I suppose I should use CONVERT_DATE_TO_EXTERNAL which I tried doing after out_tab-value = lv_netduedate which is the variable I am passing to the form. 
    Raju Shrestha wrote:
    Hi Cholen,
    I believe your lv_laufd is a 10 character field in format MM/DD/YYY or DD/MM/YYYY. You should move that data to a 8 character variable (say lv_date) in YYYYDDMM format.
    Please try this conversion
        CALL FUNCTION 'CONVERT_DATE_TO_INTERNAL'
          EXPORTING
            date_external            = lv_laufd
          IMPORTING
            date_internal            = lv_date
          EXCEPTIONS
            date_external_is_invalid = 1
            OTHERS                   = 2.
    Check in debug, you should get lv_date in YYYYMMDD. Now use lv_date in your WHERE clause.
    If you still do not get data after lv_date eq YYYYMMDD, check your LIFNR and KUNNR. They should be 10 charaters with leading zeroes if not 10 .
    If needed use the conversion for lv_lifnr and lv_kunnr.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            date_external            = lv_lifnr
          IMPORTING
            date_internal            = lv_lifnr.
        CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
          EXPORTING
            date_external            =  lv_kunnr
          IMPORTING
            date_internal            =  lv_kunnr.
    Cheers,
    Raju.

  • String maniplute for exampl Date format

    hello every body i need some help with this program.
    Req:
    INPUT:
    date in this form "mm/dd/yyy" range from "1000<=yyyy<=3000"
    OUTPUT:
    Example:
    Enter a date: 05/01/2005
    05/01/2005
    01/05/2005
    2005-05-01
    May1, 2005
    01 May 2005
    5/1/05
    That what I did so far, pleas I need your help
    import java.lang.*;
    import java.util.Scanner;
    public class string control
       public static void main (String [] args)
       Scanner scan = new Scanner(System.in);
       String input;
       String day;
       String month;
       String year;
       System.out.print("Enter a date: ");
      input = scan.nextLine();
      int pos= input.indexOf (' ');
      month = input.substring (0,4);
       input = input.substring(pos+1,input.length());
       day= input.substring(0,input.indexOf(' '));
       int locmonthchar = input.indexOf(' ')+1;   // to break it & make it esaier.
      year= input.substring(input.indexOf(' ')+1,input.length());
       String newinput = year + ","+month+day.charAt(0);

    Programer2010 wrote:
    just write each string as a function
    for example: public string getDay()...No. Don't do this if you can avoid it. Use SimpleDateFormat (as suggested above) and with different format strings is in my mind the simplest, most straightforward, and likely correct (if this is homework) answer. check out the API.

  • Issue with date conversion

    Hello,
    I am getting input string as YYYYMMD. I want it to be converted to date format based on the format that user has in his profile.
    So if user has MM/DD/YYY or DD.MM.YYYY or any other ata from user data paramets, I want to convert it into that format.
    I tried using FM Convert_date_to_external but it has issue since when I test it does not take data in YYYYMMDD format.
    Please hlep.
    Regards,
    rajesh.

    Hi Rajesh,
    1. Define a variable with type 'DATS'.
    2. Move input date string 'YYYYMMDD' to this.
    3. Write this date variable to Output string.
    DATA : v_date type dats,
               output_date_string(10) type c .
    v_date = input_date_string .
    write v_date to output_date_string .
    And  output_date_string will contain the date in user defined date format.
    Thanks,
    Aditya. V

  • How Shall I Proceed with the implementation?

    Hi all,
    Its a bit urgent... plz respond quickly.
    I m facing a prob to understand how shall i proceed with implementation of master data. I hv a single ecc6 with two clients. client xxx is assigned to xxxx company code and client yyy is assigned to yyyy company code. single ecc maintained for two companies.
    Now
    1)  i dont understand how shall i load master data under this situation?
    2) What changed need to be done for datasources in ecc?
    3) Again some of the data is common between company codes. How to achieve that?
    Experts please help me to start with this.
    Thanks & Regards,
    Kush
    Edited by: Kushal Prajapati on Apr 11, 2008 11:29 AM

    Icone to launch phothshop I am sorry but I don't understand your question.  Can you please restate it?

  • How to get period date of for a given month from a given date in mdx for SSRS report (mm/dd/yyyy)

    I have a situation,  where i need to write expression Period to date(PTD). i want to know how to get the period date. i want you to help in writing Period date or else is there any function to get period date for a given date(the  date is given
    from the parameter dynamically) in MDX for SSRS report
    ram

    Hi ram,
    Per my understanding that you want to get the period date based on the month selected and the given date, right?
    Could you please provide details information below to help us better understanding your requirements, thus we will be more effective to provide an solution:
    What is the format of the period date you want to get, is this date in the DB and you want to filter it based on the month and the given Date?
    Did the month and given date are two parameters in the report? if possible, could you please provide some sample data in the DB and also the snapshot of the report structure
    I assume you want to get the period date(mm/dd/yyy) between the select month(e.g:Feb) and the given date (10/1/2014) and you should get the date between(02/01/2014-10/1/2014).
    If so,and you also have two parameter "Month","EndDate"(EndDate is the given date), please reference to details information below:
    You can create an new parameter "BeginDate" (Date/Time) which is the begin date of the period, you can use the expression to get the value based on the value of the month and the year value from the given date,finally hide this parameter:
    Specify the available value:
    Label:=Parameters!Month.Value &"/01/"& DatePart("yyyy",Parameters!EndDate.Value)
    Value:=CDate(=Parameters!Month.Value &"/01/"& DatePart("yyyy",Parameters!EndDate.Value))
    Specify the default Value:
    Value:=CDate(=Parameters!Month.Value &"/01/"& DatePart("yyyy",Parameters!EndDate.Value))
    Add filter to the dataset as below:
    Preview you will get all the date in the given Period:
    If you still have any problem, please feel free to ask.
    Regards
    Vicky Liu

  • How to add date in MM/DD/YYY  format at the end of a string

    Hi
    I want Description to look like
    ' PARTICIPATION ON TEMPORARY TV SHOW EXPIRING ' and include the "latest show expiration date" as "MM/DD/YYYY"
    Pls help ......
    try {
                            Date date= new Date();
                             System.out.println("THE TODAYS DATE is :"+date);
                               DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
    //                         DateFormat df = new SimpleDateFormat("MM/DD/YYYY");   -----> Its not allowing this format ????????
                             begin_Date = hashDateE.get(id);
                             System.out.println("THE LATEST TV SHOW DATE is :"+begin_Date);
                             Date d1 = df.parse(begin_Date);
                             String relation;
                             if(d1.equals(date))
                                  relation = "both the dates are same";
                             else if(d1.before(date))
                                  relation = "BEFORE";
                             else
                                  relation = "AFTER";
                             //System.out.println(d1 + "is" + relation + ' ' + date);
                             if("10".equals(latestShow)){
                              if("BEFORE".equals(relation)){
                                   System.out.println("The latest show date is expired");
                              Code =3;
                              Description = "PARTICIPATION ON TEMPORARY TV SHOW EXPIRED ";
                              else if("AFTER".equals(relation)) {
                                   System.out.println("The latest show date is non expired");
                                  Code = 2;
                                   Description = "PARTICIPATION ON TEMPORARY TV SHOW EXPIRING" + d1; -------------> I TRIED THIS WAY ( d1 should be in this format MM/DD/YYY
                              }else {
                                   System.out.println("The latest show date is non expired");
                                 Code = 20;
                                  Description = "PARTICIPATION ON TEMPORARY TV SHOW EXPIRING" + d1;
                        

    If you have a string like 2008-12-15 and you want to interpret it as a date and format it as 12/15/2008, then you need two DateFormat objects.
    One to parse the String in the first format into a Date, -------> i could do this
    try {
              String begin_date = "2008-12-15";
              System.out.println("The begin date is :"+begin_date);
              DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
              Date d1 =  df.parse(begin_date);
              System.out.println("the Date value is d1 :"+d1);
    catch() {
    }Output is :The begin date is :2008-12-15
    the Date value is d1 :Mon Dec 15 00:00:00 EST 2008
    Pls help me with the second part :- ?????/
    and one to format that Date into a String in the second format. MM/dd/yyyy --- how to do this ..after i tried several times with different statements , i am asking this piece of code to achieve this

  • Date format mm/dd/yyyy to mmddyyyy

    Hi All,
    I would like to convert the date fromat from mm/dd/yyyy to mmddyyyy.
    Actually i'm taking into a variable n checking it & concatenating it.
    But I want to know any fm for this.
    I want to know in which format the date is entering my program, if the date is coming in mmddyyyy, then I have no issues, I want to go n display in the same format.
    but if it is coming in the different i want it to b converted. mm/dd/yyyy to mmddyyyy.
    Can any body let me if there is any FM , and also let me know how to check the Date Format.
    Regards
    Rohini devi

    hi,
       WRITE : sy-datum.
       DATA : dat TYPE d.
       dat = sy-datum.
       WRITE :/ dat.
    the above mentioned code will give u output
    o/p=> 22/05/2008 -
    this is the format which u have
             22052008   -
    this is wat u wanted
    so jst assgin the variable which has value in dd/mm/yyy to a variable of type d
    reward points if useful

  • Date to show in MM/DD/YYYY format

    Hi all,
    I am stumped on this simple thing under BIP.How can I get the date to show in MM/DD/YYYY format under BIP ?
    Template is created under word, for the field under formatting, type: date, format:M/d/yyyy ( can't find MM/DD/YYYY). But when I browse the document, it always show as "DD-MON-YYYY" format.
    How to mitigate this ?
    Thanks
    Munshar

    Hi ,
    hey small mistake in my solution code,just change the format to dd/MM/yyyy (case sensitive code)then it will work
    to-char() is used to convert the Date or Number format type to displayable string format.
    In our case also it is coverting xml_date_filed into a string to the format of dd/MM/yyyy
    so you can try with this formula
    in Advanced tab write
    *<?xdofx:to_char(MY_DATE_FIELD,'dd/MM/yyyy')?>*
    or in properties tab ,under formatting section ,select type as DATE and write the format as dd/MM/yyyy
    best/Aravind
    Edited by: Aravind on Aug 18, 2011 9:58 AM, with correct solution

  • Re:How to pick the date format as dd/MM/yyyy from the database

    Hi all,
    I am using JDev 11.1.2.3.0
    My requirement is ,i want to pick the date from the database as dd/MM/yyyy format.I set the attribute as
    r1.setAttribute("JobDescription",
    "From" + olrow.getAttribute("PeriodFrom") + "To" + olrow.getAttribute("PeriodTo")
    here periodFrom and periodTo are the date attributes.i set periodFrom and periodTo date format as dd/mm/yyyy in the VO.on UI page it is showing dd/mm/yyyy format.but it is storing in the database as yyyy/mm/dd format.Here my problem is when i set periodFrom and periodTo values to the JobDescription,the JobDescription format is showing yyy/mm/dd format.here i want to show the JobDescription also dd/mm/yyyy format on the UI page.here JobDescriptin type is string.can anyone help me out please...
    Thanks,
    G.Shilpa

    Hi,
    you can use SimpleDateFormat to parse Date objects to formatted Strings
    SimpleDateFormat (Java Platform SE 7 )
    Note that dependent in your Date type you may deal with Date or SQL Date in ADF BC. SqlDate woild need to be converted to Date first and then parsed into a formatted String. I suggest you Google for SimpleDateFormat examples
    Frank

  • Converting Dates from dd/mm/yyyy to mm/dd/yyyy

    This one is really doing my head in.  I have a Date Picker on a userform that places the selected date into a textbox as dd/mm/yyy.
    I have taken that textbox value and put it into a function to split it to days, months etc and it is definitely stored as dd/mm/yyyy but, when I move that value to a cell in a worksheet it converts it to mm/dd/yyyy even though the cell has been formatted
    to be dd/mm/yyyy.  I place the value in the worksheet using:
    With Sheets("Engine")
         NextRow = .Cells(.Rows.Count, "A").End(xlUp).Row + 1
         .Cells(NextRow, 1).Value = tbPayDate.Value
    End With
    Any help would be appreciated.
    BHend

    The problem is you are inserting the text box content as text and not as a date. Convert the text value to a date and it should conform to the formatting in the cell.
    .Cells(NextRow, 1).Value = CDate(tbPayDate.Text)
    Graham Mayor - Word MVP
    www.gmayor.com

  • YYYYMMDDHHMMSEC to MM/DD/YYYY HH:MM:SEC

    Hi,
    I have a requirement where I need to convert the time stamp with the format YYYYMMDDHHMMSEC should be converted to
    MM/DD/YYYY HH:MM:SEC .
    to convert YYYYMMDD to MM/DD/YYY I am able to use the Function Module CONVERT_DATE_TO_EXTERNAL.
    But to convert HHMMSEC to HH:MM:SEC, is there any funtion module.
    Would you please help me on this.
    Moderator Message: Basic Date/Time questions are not allowed.
    Edited by: kishan P on Feb 23, 2011 4:02 PM

    <<Removed by moderator. Do not reply to basic questions.>>
    Edited by: kishan P on Feb 23, 2011 4:05 PM

  • Coverting Date.toString() back to a new Date object

    http://java.sun.com/j2se/1.4.2/docs/api/java/util/Date.html#toString()
    After reading this, I am able to see the output format:
    dow mon dd hh:mm:ss zzz yyyy
    However, my questions is, what if you want to convert this String back into a new Date object later? After reviewing SimpleDateFormatter and other related classes, I find nowhere there is a linked parsing that allows this to be easily coverted back into a new Date object at runtime.
    Am I wrong?
    Thanks.

    Yup, the problem is that I do not have a reference to
    the original string. Is there a simple direct way to
    do this?Wait, I misread this. The original string?
    If you have a Date and get a String out of it, and you later want the original Date, then it's generally better to restructure your app to preserve the original Date. If for some reason that isn't an option (although often things are options when you don't think they are), then you can use SimpleDateFormat to produce a new Date object who value matches the date that the String represents.

  • Creating automaticly foldername by date (YYY MM DD) fails in PSE10

    Using Elements 10 i have a problem when importing files from my camera to Harddisk.
    I want to import the files in Elements Organizer creating automaticly a foldername like YYYY MM DD.
    If i choose this (YYY MM DD) in properties(Camera and Cardreader), Elements Organizer will creat a Folder like YYYY DD MM.
    Because i have a lot of photos organized within Organizer it is difficult to find the folders
    by date on my harddisk.

    Hi, Brian,
    No - I tried downloading the new update a couple of times and it always seemed to delete files from my card after dowloading them - so I went back to the old version - I can cope with the wrong date format by using a custom date setting which seems to work.
    In terms of the downloader duplicating files - it seems to work if I use the basic dowloader (at least it picks up some duplicates) - but does'nt work when I use the advanced format where you can choose which pictures to copy across.
    Maybe my set up is odd in some way - at least I know these work arounds now.
    DW

Maybe you are looking for