Converting dat/timestamp field into desired format

Hi all
How do I convert sysdate or current_timestamp to the following format?
August 26, 2002 11:44:00 AM PDT
I am struggling mainly with the timezone portion (PDT) etc.
Would appreciate any help - Thanx!:)
Regards
Menon:)

You won't be able to add the timezone to the date format itself. You'll rather have to tack on the literal string to the end of the date string.
select to_char(sysdate,'fmMonth dd, yyyy hh:mi:ss AM')||' PDT' from dual;
Armand

Similar Messages

  • Converting a timestamp field from GMT to EST

    Hi
    I have to convert the timestamp field coming from the source from GMT to EST.
    CREATE TABLE X
    TS_FIELD TIMESTAMP(6)
    INSERT INTO X VALUES('07-JAN-13 02.00.06.597000 PM');
    INSERT INTO X VALUES('07-FEB-13 02.00.06.676000 PM');
    INSERT INTO X VALUES('07-MAR-13 12.36.14.260000 PM');
    INSERT INTO X VALUES('07-APR-13 12.36.56.713000 PM');
    INSERT INTO X VALUES('07-MAY-13 03.46.48.800000 AM');
    I need to convert the above timestamp field from GMT to EST in 24hour format.
    I tried it doing,but I am getting hours conflict with the day error.
    I have tried the below one and milliseconds being set to zero's
    select X,
    TO_timestamp(TO_CHAR(CAST(FROM_TZ(CAST(TO_DATE(TO_CHAR(X,'YYYY-MM-DD HH24:MI:SS.SSSSS')
    ,'YYYY-MM-DD HH24:MI:SS.SSSSS')
    AS TIMESTAMP),'GMT') AT TIME ZONE 'US/EASTERN' AS DATE),'YYYY-MM-DD HH24:MI:SS.SSSSS'),'YYYY-MM-DD HH24:MI:SS.SSSSS')
    FROM X
    Please help me in this regard.I am trying in parallel as well.
    Thanks in advance
    KVB

    Not clear what are you trying to achieve..Why are you casting as DATE?
    SQL>  select ts_field,
      2          cast(from_tz(ts_field,'GMT') AT TIME ZONE 'EST' as timestamp) t
      3   FROM X;
    TS_FIELD                                                                    T
    07-JAN-13 02.00.06.597000 PM                                                07-JAN-13 09.00.06.597000 AM
    07-FEB-13 02.00.06.676000 PM                                                07-FEB-13 09.00.06.676000 AM
    07-MAR-13 12.36.14.260000 PM                                                07-MAR-13 07.36.14.260000 AM
    07-APR-13 12.36.56.713000 PM                                                07-APR-13 07.36.56.713000 AM
    07-MAY-13 03.46.48.800000 AM                                                06-MAY-13 10.46.48.800000 PM

  • How to convert the text field into currency field

    Hi,
    I have an requirement to converting the text field into currency.
    If I convert directly it gives dump.
    If I convert this to Numeric means it takes the decimals also as whole value.
    Is there any FM to convert the text field into Currency field.
    Please advice me.
    Thanks in advance.

    Hi,
    I am on an SRM sytem, which unfortunately does not have th FM: PSSV_TEXT_INTO_FIELD_CURRENCY.
    But I also need to transfer a string value like '12,99' to a field with type curr.
    Can i Do that manually, or is there another FM?
    I have already checked code with write to or pack/unpack.
    But without success yet.
    Something like this:
    DATA: g_str(11) type c.
    DATA: g_p type p.
    WRITE '12,99' TO g_str CURRENCY 'EUR'.
    is no use for me. Finally I need to move g_str to my curr-field, which causes st22.
    also: PACK g_str to <curr-field or g_p> dumps.
    Help appreciated.
    regards, matthias

  • Converting the WAD applications into PDF format

    Hi SAPians,
    I'm in need to convert WAD results into PDF Format using SAP BW 3.5 and Acrobat Reader 7.0. And I've referred some documents in Net, But,they gave ideas only for 3.5 and Acorobat 5 version.
    But i've to convert the WAD results into PDF format only by using Acrobat Reader 7.0. So, kindly let me know the steps to do so.
    Thanks in Advance.
    Jayaprakash J

    Hi Shahid syed,
    Thanks for your reply.
    It was very useful.
    But, i've askd the solution for sap bw 3.5 with Acrobat reader 7.0.
    So, plz let me knw if any solutions for that to make wad reports into pdf format.
    Points will be awarded.
    Thanks & Regards
    Jayaprakash J

  • How do I insert a 'date created' field into a template?

    I know that you can insert date & time fields into templates and make them auto-update whenever I open the document, but I am wondering if I can make the date field be set to the date when I created the document and then stay that date even if I reopen the file?
    In other words, is there a "Date Created" field?
    Thanks in advance for any help given.
    I am using Pages '09.

    I believe the date will either update always or never, depending on how you set it's options. I don't believe you will find an option for Update Once and Never Again.
    You will have to update the date upon creation and then set the option to not update. You can always find the creation date in the Document Inspector, Info tab, Show File info. You can also read this information in the Finder.
    Jerry

  • How to convert cXML dtd files into xsd format and use them into BPEL application

    Hi,
    In my BPEL application I have to use cXML dtd files by converting them into xsd format.
    I have used 'Microsoft Visual Studio' for converting cXML.dtd file into xsd format, for this 1 dtd file I am getting three xsd files (cXML.xsd, cXML1.xsd and cXML2.xsd).
    Please check this once and let me know
    1. why I am getting three xsd files for one dtd file,
    2. how can I use cXML.xsd file in my application, do I ll have to use all the three files in my BPEL app and
    3. what should I include in main xsd file (cXML.xsd) to import other two xsd files.
    kindly check this once and let me know your suggestions .
    Thanks

    Hi,
    While downloading the cXML dtd there will be example xml files. Using this xml's we can generate xsd.
    Regards,
    KANN.

  • Convert MPEG 4 file into different format

    I have a TrekStore Movie Station which only supports formats like DVD (IFO,VOB), VCD (MPGEG1), SVDC/KVCD (MPEG2), DivX 3, DivX5, XviD. In Quick Time Pro Help it says I can convert an save movies into different formats, I just can't find how I can do it.

    I have a TrekStore Movie Station which only supports formats like DVD (IFO,VOB), VCD (MPGEG1), SVDC/KVCD (MPEG2), DivX 3, DivX5, XviD. In Quick Time Pro Help it says I can convert an save movies into different formats, I just can't find how I can do it.
    QT Pro does not "do" multiplexed compression formats. For that you would need an external, third-party, MPEG-based application. iDVD, Toast, Visual Hub, iVCD, MPEG2 Works, etc. would work here to create some of these formats. QT Pro, MPEG Streamclip, and GarageBand can all create DivX and/or XviD files if you have the appropriate QT components installed. (Not sure if you can still find DivX 3 but assume free download of DivX 5.1.1, 5.2.1, and/or Xvid are still readily available on the internet.)

  • How to convert message in XI into PDF format

    Hi,
    I am trying out a scenario where i am getting an idoc from SAP into XI and now in XI i need to convert the data into pdf format and send that pdf in a mail using mail adapter.
    Can any body help me out how to convert a message in XI to pdf format.
    Thanks in Advance!!
    Regards,
    Sudheer

    Hi Sudheer
    follow these links
    http://www.erpgenie.com/sap/sapedi/Conversion%20of%20IDOCs%20to%20XML%20format.pdf
    Here is the complete code for you;
    It Converts spool request into PDF document and emails it.
    http://www.sapdevelopment.co.uk/reporting/rep_spooltopdf.htm
    Smartform as attachment in mail. - 46k
    http://sap.ittoolbox.com/groups/technical-functional/sap-dev/convert-smartforms-form-in-pdf-998715 - 87k
    SMART form to PDF
    https://wiki.sdn.sap.com/wiki/display/Snippets/ConvertSmartformtoPDFformat
    smartform to MAIL
    https://wiki.sdn.sap.com/wiki/display/Snippets/SmartformtoMailasPDF+attachment
    Regards
    Sandeep Sharma
    PS: if helpful kindly reward points

  • Converting the Opaque Element into Readable format.

    Hi,
    Right now, I am using the FTP adapter to continously poll for a new file. Whenever new file comes in, our BPEL process gets initiated. We get the contents of the file in the variable of opaque element( I have given Message Schema is Opaque in the FTP Adapter configuration).
    I have to send the content of the file as the attachment in the e-mail. So when I am using the above variable in the e-mail notification, I am getting the data in the non-readable format, since the corresponding variable is of opaque schema. Now my requirement is to convert this non-readable opaque data into the readable data.
    Any help is highly appreciatable.

    Sorry the code I gave you was decodeing a hex variable into string.
    Try this code:
    String input = (String)getVariableData("InputBinary");
    Base64Decoder Decoder = new Base64Decoder();
    String decoded = Base64Decoder.decode(input);
    setVariableData("OutputString",decoded);
    you will also need to add the java class:
    <bpelx:exec import="com.collaxa.common.util.Base64Decoder"/>
    Just looking at the Base64 string you are testing. It is missing the 'g' off 'Testing'. The correct binary string should be VGVzdGluZw==
    I'm not sure how this code is getting generated but you may need to look in that.
    If you want the code to encode into binary use this:
    String input = (String)getVariableData("InputString");
    Base64Encoder encoder = new Base64Encoder();
    byte[] barray = (new String(input)).getBytes();
    BigInteger bint = new BigInteger(barray);
    String encoded = Base64Encoder.encode(barray);
    setVariableData("OutputBinary",encoded);
    add the java class:
    <bpelx:exec import="com.collaxa.common.util.Base64Encoder"/>
    sorry for putting you wrong.
    cheers
    James

  • I finished making an animated .gif image in FireWorks. My question is, how do I convert it into video so that when I edit video, that every video editing program recognizes it? Long story short, How do I convert animated .gif files into video formats?

    I worked in Adobe FireWorks to make the animated .gif. What program do I use to convert the file from .gif to any video format: .mp4, .m4v, .avi, .wmv, etc. I want to convert it into video format, so that QuickTime Player plays the video, I can insert it into iMovie '11 and edit, and also insert it into Final Cut Pro X and edit video.

    Thanks for getting back with me so promptly.  It has taken me this time to connect with the proper people to find out the information you requested.
    The camera used to film the class was a Panasonic AG-HMC40P, owned by a local cable TV station; they use Kodak video encoding software, and a SD card was used to store the video.   The file extension is .mts, and the mime file is MPEG 2 transport.  He said I probably need an AVCHD converter, and the Mac app store lists 8 of those options, 4 free and 4 for up to $9.99.  He said I'll also need a converter for later plans of posting on YouTube or on the website, and while some of those in the app store might work for the later needs, he knows one app called "Compressor" that would work for the uploading later.  He also suggested I could try renaming the .mts file to .MP2T, but he wasn't sure that would work.
    They don't work with Macs at the studio, but I had thought I could have some lessons there in editing, and apply what I learned to my iMac and iMovie.
    First, though, I have to be able to see it and review it!
    Thanks again!

  • How to convert a pdf file into RTF format or Doc Format

    Hello
    I need to convert a pdf file into a rtf file or doc file.
    But i need to do this with a command line or with the api of acrobat.
    My version is adobe acrobat 9 standard.
    Is it possible to do this?
    So i see there's a convert pdf online.
    Is it possible to use this whith a web service?
    The final file (RTF or doc) must be analyse into an application
    Best regards

    Look at the doc.saveAs JavaScript method: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_AcroJS.88.524.html
    You can save to other formats when you include the corresponding cConvID parameter. It can be used in a batch sequence, but you'll need the Pro version for that.

  • Getting error while converting an iview output into pdf format

    hi all,
    i am new to visual composer and portal.
    i have created an iview to display a list. i can see the list  but on clicking a button 'copy to pdf' ,i am getting an error message
    Portal Runtime Error
    An exception occurred while processing your request
    Exception id: 04:33_19/09/08_0002_2720650
    See the details for the exception ID in the log file.
    where can i see this log file?? and what will be the reason for this error? and the way to solve this???
    thanks in advance...

    i have created a simple rfc to get the detail list of the company codes in r3.
    in visual composer , i have created an iview using this rfc to display the list.
    i have one button called copy to pdf to convert this list into pdf format.
    i have used formula for this button is
    "pcd!3aportal_content!2fcom.sap.pct!2fplatform-add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bexwebanalyzer?QUERY="& STORE@REPTNAME & "&BI_COMMAND_1-EXPORT_FORMAT=PDF&BI_COMMAND_1-SHOW_EXPORT_DIALOG=X&BI_COMMAND_1-null="
    when i am executing the iview , i am able to see the output of the iview which is a company code list.
    but when i am pressing the button to convert to pdf, i am getting the error.
    Portal Runtime Error
    An exception occurred while processing your request
    Exception id: 04:33_19/09/08_0002_2720650
    See the details for the exception ID in the log file.
    so please help me out..

  • Convert the XML file into XSD format?

    Hello All,
    I got XML file and i need to convert into XSD format and import it into PI system, so no need to create the structure.
    Please let me know how to convert XML format into XSD format.
    Regards,
    chinna

    Hi ,
    You can use Altova XML Spy software. There just open the xml file and goto Menu bar DTD/Schema there you have an option like Genrate DTD/Schema  click on it and press ok, Then it will ask you for location to store xsd select Desktop or some folder.
    .xsd will be created. and you can import that.
    Thanks.

  • GRR2- 4FM-RepPaint(put ABAP code for convert data in field)

    Hi,
    If somebody know how possible add ABAP code for convert data in some column-field of report (by RepWriter,UserExit,BADI)?
    Thanks a lot.

    Elaborate your question. Not clear ??

  • Converting sap script output into pdf format?

    Hi all,
    I have modified the standard purchase order script form MEDRUCK . Now i need to generate the output into pdf format.
    This is not only limited to  spool requests , But also  when the user creates the purchase  order and clicks on print or print preview the output should be in pdf format.
    Please help on where and what code has to be written for this requirement?
    Thanks, 
    Aravind.

    Hi
    I don't know which is your release, but I don't think it's possible to create a preview in pdf format, but u can create a pdf file instead of the spool and then open it automatically, this is an example:
    - A) Open form
    IF P_PDF = 'X'.
              XDEVICE        = 'PRINTER'.
    * Get OTF
              ITCPO-TDGETOTF = 'X'.
          ENDIF.
          CALL FUNCTION 'OPEN_FORM'
               EXPORTING
                    DEVICE                      = XDEVICE
                    DIALOG                      = 'X'
                    FORM                        = 'ZFI_CL_EC_MOVI'
                    OPTIONS                     = ITCPO
                    MAIL_SENDER                 = LVS_SENDER
                    MAIL_RECIPIENT              = LVS_RECIPIENT
               EXCEPTIONS
                    CANCELED                    = 1
                    DEVICE                      = 2
                    FORM                        = 3
                    OPTIONS                     = 4
                    UNCLOSED                    = 5
                    MAIL_OPTIONS                = 6
                    ARCHIVE_ERROR               = 7
                    INVALID_FAX_NUMBER          = 8
                    MORE_PARAMS_NEEDED_IN_BATCH = 9
                    SPOOL_ERROR                 = 10
                    OTHERS                      = 11.
          IF SY-SUBRC <> 0.
            EXIT.
          ENDIF.
    B) Close FORM
    CALL FUNCTION 'CLOSE_FORM'
             TABLES
                  OTFDATA                  = T_OTF
             EXCEPTIONS
                  UNOPENED                 = 1
                  BAD_PAGEFORMAT_FOR_PRINT = 2
                  SEND_ERROR               = 3
                  SPOOL_ERROR              = 4
                  OTHERS                   = 5.
        IF SY-SUBRC <> 0.
          MESSAGE I208(00) WITH 'Errore chiusura stampa'(A02).
        ELSE.
          PERFORM DOWNLOAD_PDF.
        ENDIF.
    C) Create PDF and open it:
    FORM DOWNLOAD_PDF.
      DATA: BIN_FILESIZE TYPE I.
      DATA: T_FILE_PDF     TYPE STANDARD TABLE OF TLINE,
            DOCTAB_ARCHIVE TYPE STANDARD TABLE OF  DOCS.
      DATA: FILE_TABLE     TYPE FILETABLE WITH HEADER LINE.
      DATA: RC          TYPE I,
            USER_ACTION TYPE I.
      DATA: TITLE    TYPE STRING,
            FILENAME TYPE STRING.
      CHECK P_PDF = 'X'.
      CALL FUNCTION 'CONVERT_OTF_2_PDF'
           IMPORTING
                BIN_FILESIZE           = BIN_FILESIZE
           TABLES
                OTF                    = T_OTF
                DOCTAB_ARCHIVE         = DOCTAB_ARCHIVE
                LINES                  = T_FILE_PDF
           EXCEPTIONS
                ERR_CONV_NOT_POSSIBLE  = 1
                ERR_OTF_MC_NOENDMARKER = 2
                OTHERS                 = 3.
      IF SY-SUBRC <> 0.
        MESSAGE I208(00) WITH 'Errore conversione PDF'(A03).
        EXIT.
      ENDIF.
      TITLE = 'Creare File'(T02).
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
         EXPORTING
           WINDOW_TITLE            = TITLE
           DEFAULT_EXTENSION       = '*.pdf'
        CHANGING
          FILE_TABLE              = FILE_TABLE[]
          RC                      = RC
          USER_ACTION             = USER_ACTION
        EXCEPTIONS
          FILE_OPEN_DIALOG_FAILED = 1
          CNTL_ERROR              = 2
          ERROR_NO_GUI            = 3
          OTHERS                  = 4
      IF SY-SUBRC <> 0.
        MESSAGE I208(00) WITH 'Errore creazione PDF'(A04).
        EXIT.
      ELSE.
        IF USER_ACTION = 9. EXIT. ENDIF.
        IF RC = 1.
          READ TABLE FILE_TABLE INDEX 1.
        ENDIF.
      ENDIF.
      MOVE FILE_TABLE-FILENAME TO FILENAME.
      CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
        EXPORTING
           BIN_FILESIZE            = BIN_FILESIZE
           FILENAME                = FILENAME
           FILETYPE                = 'BIN'
        CHANGING
          DATA_TAB                = T_FILE_PDF
        EXCEPTIONS
          FILE_WRITE_ERROR        = 1
          NO_BATCH                = 2
          GUI_REFUSE_FILETRANSFER = 3
          INVALID_TYPE            = 4
          NO_AUTHORITY            = 5
          UNKNOWN_ERROR           = 6
          HEADER_NOT_ALLOWED      = 7
          SEPARATOR_NOT_ALLOWED   = 8
          FILESIZE_NOT_ALLOWED    = 9
          HEADER_TOO_LONG         = 10
          DP_ERROR_CREATE         = 11
          DP_ERROR_SEND           = 12
          DP_ERROR_WRITE          = 13
          UNKNOWN_DP_ERROR        = 14
          ACCESS_DENIED           = 15
          DP_OUT_OF_MEMORY        = 16
          DISK_FULL               = 17
          DP_TIMEOUT              = 18
          FILE_NOT_FOUND          = 19
          DATAPROVIDER_EXCEPTION  = 20
          CONTROL_FLUSH_ERROR     = 21
          OTHERS                  = 22
      IF SY-SUBRC <> 0.
        MESSAGE I208(00) WITH 'Errore creazione PDF'(A04).
        EXIT.
      ELSE.
        MESSAGE S208(00) WITH 'File creato con successo'(S01).
      ENDIF.
      CHECK P_OPEN = 'X'.
      CALL FUNCTION 'CALL_BROWSER'
           EXPORTING
                URL                    = FILE_TABLE-FILENAME
           EXCEPTIONS
                FRONTEND_NOT_SUPPORTED = 1
                FRONTEND_ERROR         = 2
                PROG_NOT_FOUND         = 3
                NO_BATCH               = 4
                UNSPECIFIED_ERROR      = 5
                OTHERS                 = 6.
      IF SY-SUBRC <> 0.
        MESSAGE S208(00) WITH 'Impossibile aprire file'(A05).
      ENDIF.
    ENDFORM.                    " DOWNLOAD_PDF
    Max

Maybe you are looking for

  • Mac's lies

    Hello, I am a new user of the forum, but assiduous of mac. I go years with mac, nowadays I have several models (MacPro, G5, MacbookPro, etc), yesterday I decided to changing my PCserver into a new MiniMac 2Ghz, but it was not including 10.5 not iLife

  • JNDI lookup fails ...IMMEDIATE HELP REQUIRED !!!

    Hi I am new to using the WLS,currenty I am using Weblogic6.1(sp).I developed a statelessSession Bean and have successfully deployed it to the server.Counterfit I wrote a Client class to check weather my beans are working properly.My client class to b

  • Error starting http server 10g

    After installing http server 10G it started fine. I then followed the instructions in apex install guide to create a marvel.conf file and edit the httpd.conf file. Now when I go to start the server i receive the following error in the log file: /u01/

  • Ipad preview problem

    Hi All Just getting used to the DPS.  I have uploaded a folio  and an article to the DPS.  I have installed the content viewer on the ipad and synced with itunes.  How do I preview the content on the ipad?  I cant seem to see anywhere to sign in. Man

  • 1046: Type was not found or was not a compile-time constant: Event.

    I am more than a little frustrated.  I'm using Flash Professional CS5.5, attempting to publish ActionScript 3.0 for FlashPlayer 10.2 My code begins with: import flash.events.MouseEvent; import flash.events.Event; import flash.events.KeyboardEvent; im