Sysdate - how to convert into a certain format

Hi,
I am trying to use sysdate as a default parameter in one of my reports and getting an error message (ORA-01843: not a valid month)...
my sysdate is coming up in the following format (DD-MMM-YY) and is giving an error message... but when I tried the date manually in following format (MM/DD/YYYY) it worked...
may I know how to convert sysdate into the following format MM/DD/YYYY
thanks in advance

my sysdate is coming up in the following format (DD-MMM-YY)
There is no "MMM" format model. And how often does it have to be explained that 2-digit year formats are just wrong?
Suggest you post the query or expression that is causing the error. Generally there is no reason to convert <tt>sysdate</tt> away from a <tt>DATE</tt> type for anything other than display purposes. It is more likely that the error is due to an implicit conversion of another value to <tt>DATE</tt> using a non-default or incorrect format mask.
Also post the result of running
select * from v$nls_parametersin the SQL Workshop.
Edited by: fac586 on 13-Jun-2011 18:00

Similar Messages

  • How to convert date to ccyymm format

    Hi,
    How to convert date to ccyymm format.
    Thanks

    dadivela wrote:
    Re: How to convert date from ccyymm format to mmddyyI didn't inderstand. Date doesn't have any format. If you have a string in CCYYMM format, you would have to extract the YYMM from the string.
    SQL> SELECT   SYSDATE,
      2           TO_CHAR (SYSDATE, 'ccyymm') Date_Fm,
      3           SUBSTR (TO_CHAR (SYSDATE, 'ccyymm'), 3) YYMM
      4    FROM   DUAL
      5  /
    SYSDATE   DATE_F YYMM
    08-JUN-09 210906 0906You can use this string to convert it to date. Note that since DD part of your date was not their in the resultan string, the converted date will fall back to first of the month specified.
    SQL> SELECT   SYSDATE,
      2           TO_CHAR (SYSDATE, 'ccyymm') Date_Fm,
      3           SUBSTR (TO_CHAR (SYSDATE, 'ccyymm'), 3) YYMM,
      4           TO_DATE (SUBSTR (TO_CHAR (SYSDATE, 'ccyymm'), 3), 'YYMM') conv_Dat
    e
      5    FROM   DUAL
      6  /
    SYSDATE   DATE_F YYMM             CONV_DATE
    08-JUN-09 210906 0906             01-JUN-09
    SQL>Then convert the date into the required format using TO_CHAR Function
    SQL> SELECT   SYSDATE,
      2           TO_CHAR (SYSDATE, 'ccyymm') Date_Fm,
      3           SUBSTR (TO_CHAR (SYSDATE, 'ccyymm'), 3) YYMM,
      4           TO_DATE (SUBSTR (TO_CHAR (SYSDATE, 'ccyymm'), 3),
      5                   'YYMM') conv_Date,
      6           TO_CHAR(TO_DATE(SUBSTR(TO_CHAR (SYSDATE, 'ccyymm'),3),
      7                   'YYMM'), 'MMDDYY') New_Format
      8    FROM   DUAL
      9  /
    SYSDATE   DATE_F YYMM             CONV_DATE NEW_FO
    08-JUN-09 210906 0906             01-JUN-09 060109
    SQL>Hope this helps.
    Regarads,
    Jo

  • How to convert exponent to number format

    Hi,
    how to convert exponent to number format.My column is in number and the data is in exponent format .for example  data is 2.44705130197009E18 .when i do field name haveing this data like
    select * from table name where filed name =2.44705130197009E18 ,field name  is of number (20) data type .but i am not getting any data fectched .
    your advice is at most appriciated .
    Regards,
    Suja

    Example of what I was saying...
    SQL> create table myexp (name number);
    Table created.
    SQL> insert into myexp values (2447051301970090001);
    1 row created.
    SQL> select name from myexp;
          NAME
    2.4471E+18
    SQL> col name format 9999999999999999999999999999999999999
    SQL> select name from myexp;
                                      NAME
                       2447051301970090001
    SQL>
    The number you are seeing as an exponent is not just the number that is stored with lots of 0's on it, there's other information you are missing, so you need to change your format to see the true value.

  • How to convert VOB to other formats?

    As a professional VOB converter, Emicsoft VOB Converter is currently one of the best and most easy-to-use converter which can convert VOB videos to most popular video and audio formats with fast conversion speed and perfect sound & picture quality, such as VOB to MP3, VOB to M4A, VOB to WAV, VOB to AAC, VOB to AC3; VOB to DVD Video(*.vob), DVD Video-NTSC(*.vob), MPEG-1 Video(*.mpg), MPEG-2 Video (*.mpg), etc.
    Emicsoft VOB Converter can not only play the role as a converter, moreover, it can also be used as a powerful editor, which provides a lot of professional video editing functions, such as merging several videos into one file, cutting any clip of your video, cropping the video size, editing video effect and so on. You can also set output profile parameters including resolution, bitrate, frame rate, aspect ratio to get the best video quality and video size.
    How to convert VOB to other formats?
    1. Launch the software and click "Add File" button to import files into the software. You can watch them on the preview screen.
    2. Edit the added movie by clicking "Effect" "Trim" or "Crop" button which can help you create unique videos easily.
    3. Select output in Profile option. Here all popular formats and mobile devices are supported. Then make sure the destination folder.
    4. Click "Start" button and the program will automatically start conversion.
    Emicsoft VOB Converter is so outstanding with powerful converting functions and editing functions that you can enjoy it as a good helper.
    Emicsoft M2TS Converter is currently considered as one of the most professional conversion tool, due to its powerful function, user-friendly interface and easy-to-use operation design. It can achieve any video formats from M2TS to MPEG1, MPEG2, SWF, FLV, DivX, XviD, QuickTime Video, DV, AVI, MP4, WMV and HD videos, so as to make it available to sync M2TS to iPod, iPhone, PSP, BlackBerry and other mobile devices.
    Emicsoft Tod Converter is an easy-to-use HD Video conversion tool which helps you convert HD video Tod to other formats like FLV, SWF, AVI, M4V, MOV, DivX, XviD, MPEG-1, MPEG-2, VOB, MP4, M4V, RM, RMVB, WMV, MKV, AVI, 3GP, HD video with high output quality and fast converting speed. Apart from as a HD video converter, it is also a audio converter and extractor, the Emicsoft Tod Converter can aid you to extract music from Tod video such as WAV, OGG, WMA, MP3 with good sound quality.
    More softwares may help you:
    Emicsoft Video Converter
    Emicsoft FLV Converter
    Emicsoft MTS Converter

    Open the General section of the iTunes preferences, press the Import Settings button, change the default encoder to MP3, right-click the songs, and convert them to MP3. Protected content from the iTunes Store can't be used on an MP3 player.
    (37170)

  • How to convert 12 hour time format to 24 hour time format ?

    Hi,
    How to convert 12 hour time format to 24 hour time format is there any FM if not, please suggest me how to convert .
    regards,
    rakesh

    Hi,
    Have you tried function module HRVE_CONVERT_TIME
    Input parameters will be like
    TYPE_TIME                       B
    INPUT_TIME                      01:00:00
    INPUT_AM_PM                  PM
    Output
    OUTPUT_TIME                     13:00:00
    Regards

  • How to convert date from ccyymm format to mmddyy

    hi,
    How to convert date from ccyymm format to mmddyy

    Please don't multipost. This question has been answered in your first post.
    How to convert date to ccyymm format
    Regards,
    Jo

  • How to convert milliseconds to date format in sql query

    Hi All,
    The following code is in java.     
    String yourmilliseconds = "1316673707162";**
    Date resultdate = new Date(Long.parseLong(yourmilliseconds));
    could you plese tell me how to convert milliseconds into date format in query and comparing with another date like(sysdate-3)

    Hello,
    http://stackoverflow.com/questions/3820179/convert-epoch-to-date-in-sqlplus-oracle
    Regards

  • How to convert date in varchar format to TimeZone format?

    Hi,
    Iam having a date '14-05-08 09:46:35 AM' (in Varchar format). How to convert this date to TimeZone ('IYYY-MM-DD"T"HH12:MI:SS"Z"FX') format?
    For Example,
    My input date is '14-05-08 09:46:35 AM' and I need output as '2008-05-14T09:46:35Z'.
    How to convert this?
    Thanks in Advance.

    Hi,
    You would look up the TO_TIMESTAMP and the TO_CHAR functions in the SQL reference manual for the version you don't mention, and make up the solution yourself, rather than asking someone else to do your homework.
    Sybrand Bakker
    Senior Oracle DBA

  • How to convert image to binary format

    Hi all,
      We have developed an Employee search  mobile web application in .net which is hosted on an exposed IP server, we need to show the employee data along with the image of the employee on mobile.
    When we run this application through our desktop we are able to see the image of the employee since we are doing this through <b>intranet</b> , but when we try to access the same from any mobile device we are able to see only the data but no image, since we are doing this through <b>internet(exposed server).</b>
    Please suggest some way to get this image,
    is there any<b> function module in ABAP</b> which can <b>convert image to binary format</b>
    so that we <b>export binary data</b> to .net application

    Hei evryone!
    CAn anyone pls help me on how to solve this error:
    java.security.AccessControlException: access denied (java.security.SecurityPermission insertProvider.SunJCE)
         at java.security.AccessControlContext.checkPermission(Unknown Source)
         at java.security.AccessController.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkPermission(Unknown Source)
         at java.lang.SecurityManager.checkSecurityAccess(Unknown Source)
         at sun.plugin.security.ActivatorSecurityManager.checkSecurityAccess(Unknown Source)
         at java.security.Security.check(Unknown Source)
         at java.security.Security.insertProviderAt(Unknown Source)
         at java.security.Security.addProvider(Unknown Source)
         at CryptoTest.processFile(SwingApplet.java:68)
         at CryptoTest.<init>(SwingApplet.java:65)
         at SwingApplet.init(SwingApplet.java:39)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Is it allright for a swing code to access local resources? like in my case i want my swing app to decrypt and encrypt an image file but when i tried to access the method for decrypting and encrypting i got this error message on my console. Do i have to make my code signed before i could write/read a file on my hard drive?
    Any help / suggestions would be much appreciated.Thanks!

  • How to convert into columns rows

    Hi all,
    How to convert columns into rows.
    thank you
    regards
    P Prakash

    Whats your DB Version. If its 11g and above you can check out PIVOT and UNPIVOT clause of SELECT statement. Its a new feature of 11g.
    For previous version just search this forum you will get lots of examples.

  • How to convert Xstring to PDF format and send pdf to multiple user

    Hi to all
    can any one provide me saple code to convert Xstring to PDF format and send pdf to multiple user
    i have searched the SDN , but cant get any proper soulution.
    I shall be thankful to you for this.
    Regards
    Pavneet Rana

    Use function module 'SCMS_XSTRING_TO_BINARY' to convert from XString to a Binary table. Just like this:
      CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
        EXPORTING
          buffer          = lv_xstring_pdf
          append_to_table = ' '
        TABLES
          binary_tab      = lt_doc_content.
    To send the email in an OO way you should user class CA_SEND_REQUEST_BCS. Take a look to program BCS_EXAMPLE_6 or any of the test programs in package SBCOMS.

  • How to convert standard (Western) numerical format to Indian format?

    I have been doing a lot of research and while I've repeatedly found the function module to convert numerical amounts in to words (HR_IN_CHG_INR_WRDS) I haven't found a way to convert a standard numerical format, 121,212,123 in to the Indian format of 12,12,12,123 or 505,000 to 5,05,000 for example.
    I repeatedly saw in other threads people were suggesting to change the decimal format of the currency in OY01 however the Indian format option is not listed.  We only have the following options:
    X 1,234,567.89
    Y 1 234 567,89
        1.234.567,89
    Whereas I would need 12,34,567.89.
    Is there a Function Module we can use? Is there some CIN add-on we need to import to make the additonal decimal format available?
    Thanks in advance

    Check [this link>>>|http://www.xe.com/ucc/convert.cgi?Amount=10000000&From=USD&To=INR&image.x=62&image.y=20&image=Submit]
    else.. You might have to write a conversion routine...
    DATA: curr TYPE netwr,
          c(20) TYPE c.
    curr = '1234567890'.
    WRITE:/ 'before:', curr.
    WRITE curr TO c USING EDIT MASK '__,__,___.__'.
    WRITE:/ 'after:', c.

  • How to convert rm to ipod format....

    hey guys,
    im not able to convert rm to ipod format. tried out jodix converter. its asking for codecs. if any codecs plz post it here, and pleasesuggest any good converter
    thz in advance

    http://www.any-video-converter.com/any-video-converter-free.exe
    Any Video Converter 2.5.2 is free and can convert RM to iPod format.
    Just select the "Mobile Phone/Device" option when selecting the destination video format, set the audio option to AAC and manually change the video size to 320x240.
    (The Professional version costs money and has an iPod format built in, but the above link is for the free version which does exactly the same if you set it like I explained above.)

  • How to Convert Varchar2 to Date format(Timestamp)

    I have a date saved in varchar2 column.
    how can I convert the values into date(including Time stamp), so I can use the date to compare data.
    Ex: I have the value '20-03-2007 05:31:29', but this value is saved as varchar2.
    how can I take from this value the date '20-03-2007 05:31:29' as date format because later i need that date completely to add days, hours and minutes?

    SQL> create table dd (a varchar2(15));
    Table created.
    SQL>
    SQL>
    SQL> insert into dd values (sysdate);
    1 row created.
    SQL> insert into dd values (sysdate);
    1 row created.
    SQL> insert into dd values (sysdate);
    1 row created.
    SQL> insert into dd values (sysdate);
    1 row created.
    SQL> insert into dd values (sysdate);
    1 row created.
    SQL> insert into dd values (sysdate);
    1 row created.
    SQL>
    SQL> commit;
    Commit complete.
    SQL>
    SQL> select * from dd;
    A
    01-OCT-12
    01-OCT-12
    01-OCT-12
    01-OCT-12
    01-OCT-12
    01-OCT-12
    6 rows selected.
    SQL>
    SQL>
    SQL> select to_date(a,'dd-mon-yyyy') from dd;
    TO_DATE(A
    01-OCT-12
    01-OCT-12
    01-OCT-12
    01-OCT-12
    01-OCT-12
    01-OCT-12
    6 rows selected.
    SQL> select to_timestamp(to_date(a,'dd-mon-yyyy'),'dd mon yy hh24.mi.ss' ) from dd;
    TO_TIMESTAMP(TO_DATE(A,'DD-MON-YYYY'),'DDMONYYHH24.MI.SS')
    01-OCT-12 12.00.00 AM
    01-OCT-12 12.00.00 AM
    01-OCT-12 12.00.00 AM
    01-OCT-12 12.00.00 AM
    01-OCT-12 12.00.00 AM
    01-OCT-12 12.00.00 AM
    6 rows selected.
    SQL>
    that's it......

  • S_ALR_87012078 - How to Convert into ALV

    Sir,
    My client want to down load the data or report :- { S_ALR_87012078 - Due Date Analysis for Open Items (Vendors)} in DAILY INTERVAL FORMAT .
    Hence, How can I convert this report into ALV report .
    i.e..
                          Daily intervels
    Vendors I   0-30      I   31-60   I    60-90 I 9   0-120
    100001  I
    100002  I
    100100
    Thanks & Regards

    Hello,
    There is no ALV grid control here.
    However, you have three selection options:
    Graphical
    Classical
    Object Lis
    When you say for example in graphical format: Report ==> Export, again you have three options:
    Copy report to XXL, Copy page to XXL, Object list.
    Additionally you can also do HTML export.
    However, this report will not give you number of day you want like 0-30, 31-60 etc.
    For that you need to develop your own:
    Hello,
    Note that if you are on classical GL, you cannot have profit center on vendor or customer line items.
    If you are on new GL and document splitting is active then you can have profit center on customer or vendor line items.
    The following example I have given is for customers.
    The only difference is in transaction codes. For customer you go to FDI1, for vendor you go to FKI1 (reports).
    For Customer you go to FDI4, for vendor you go to FKI4 for forms.
    Remaining all are the same.
    Go to transaction code FDI4
    Select Form Type RFFRRD20 Line item analysis
    Give your form name and description
    Structure (Two axis) - as defaulted
    Click on Create
    You will have lead column
    Delete the rows 2, 3 and 4
    Double click on column 1
    Enter the customer numbers from 1 to 999999
    First column double click (A)
    Slelect following values
    Due date analysis 1
    Days for net due date 0 to 30
    Give the short name, medium name and long text for the column.
    Repeat this step in next columns like 31 to 60, 61 to 90, 91 to 120 and 121 to 99999 days etc in other columns and select due date analysis 1. (B,C,D,E)
    Create one more column by way of formula. To create a new column you need to double click on blue line. Put formula add all five columns you have created above. (F = ABCDE)
    You prepare one more column with
    Due date analysis 2 (G)
    Now you prepare one more column add (F+G) = This will be total open items = over due and not due.
    Now go to FDI1 and prepare a report - assign the form created in FDI4 to the report.
    Characteristics you need to select are
    Account Type (Select Account Type as D for customers)
    Currency
    Customer
    Document Type
    Special G/L Ind
    Company Code
    Change the output types and options according to your requirement.
    Refer FDI2 and FDI3 for other standard reports created.
    Refer FDI5 and FDI6 for other standard forms created.
    Save your report and execute.
    Regards,
    Ravi

Maybe you are looking for

  • WWAN is not reliable in X250

    Well, I spoke too soon about the "working perfectly" part in my previous post. If you close the lid (to sleep) while the Sierra EM7345 WWAN is Enabled, the computer crashes reliably next time you open the lid. Generally the crash is a BSOD with an un

  • PDF Form nested in WinForms

    I use WinForms.NET I want read/write fields from pdf form, but via pdf browser control AxAcroPDFLib.AxAcroPDF your samples demonstrate how include pdf into my app and other how set field in pdf document how combine this two samples? how from AxAcroPD

  • Reverse engineering in OWB

    Is it possible to reverse engineer the code in OWB? I am making some code changes to the oracle pl/sql package generated by OWB. Is it possible to import this package along with the code changes back to OWB? I suppose this is not possible. Can you pl

  • Fonts missing in X11

    I have been using X11 for some time now, mostly for GIMP. I have noticed before that not all my fonts were available in X11/GIMP, but didn't really care. I tought it had to do something with GIMP. Today I installed another X11 application (Inkscape)

  • IT roles not correctly updating assignedBy status in act sync

    IDM 8.0 sp5 java 1.5 I have the following issue. I have a Business role called 'A' which containes IT roles '1' and '2'. (set waveset.roles to [A] via the active sync) works: correctly The active sync runs and business role 'A' is removed. IT roles '