TO_CHAR to_date and functions are in error

Hi guys,.

My apologies if this look very stupid question to be posted on the forum, but I get errors for the following query:

select to_date('sysdate','DD-MM-RR HH24:MI:SS') + 6/24 "Adding 6 hours ahead"
from dual;

It gives me the following error.

ORA-01858: a non-digit character was found here where was waiting for a digital

01858 00000 - "a non-digit character found here where was waiting for a digital".

* Cause: Input data to convert using a date format model has been

incorrect answer.  The input data did not contain a number where is a number

required by the format model.

* Action: Fix the input data or the date format model to ensure that the

elements correspond to the number and the type.  And then try the operation again.

What I want, or I'm trying to do is I want knowledge/duty to provide information to add 6 hours before the current system.

I understand that this is because I am using to_date and "sysdate" but even if I change the to_char I always get an error

ORA-01722: invalid number

01722 00000 - "invalid number."

* Cause:

* Action:

Finally, if I try to do something with sudo double table it always gives me error, I tried the following query.

Query:

select ('sysdate','DD-MM-RR HH24:MI:SS') + 6/24 "Adding 6 hours ahead"
from dual;

O/P

ORA-00907: lack of right parenthesis

00907 00000 - "lack the right parenthesis.

* Cause:

* Action:

Error on line: column 74: 18

May I know where I'm basically bad?

Would be really appreciated your advice.

Thank you!

Function SYSDATE returns the DATE data type. So do not point using TO_DATE on it to convert it to DATE.

What you need is

SQL > alter session set nls_date_format = 'DD-MON-YYYY HH24:MI:SS ";

Modified session.

SQL > select sysdate
2, sysdate + '6' time-span
3 double;

SYSDATE SYSDATE + INTERVAL '6' H
-------------------- --------------------
APRIL 21, 2014 03:21:27 APRIL 21, 2014 09:21:27

SQL >

Please read Re: 15. I want to store Dates in the Format... Learn about implementing shaped and the DATE data type.

Tags: Database

Similar Questions

  • Visual studio displays an error message indicating that these functions are not in the context.

    Original title: c#

    I am using visual studio 2010... but when I use commands like ToInt, den ToDouble etc, it shows an error indicating that these functions are not in the frame... Please give a solution... Thank you

    This issue is beyond the scope of this site and must be placed on Technet or MSDN

    http://social.technet.Microsoft.com/forums/en-us/home

    http://social.msdn.Microsoft.com/forums/en-us/home

  • Equivalent OBIEE TO_DATE and SUBSTR functions

    I have the formula for the next column, which works correctly:

    SUM (CASE WHEN (TimeStampDiff (SQL_TSI_month, "Registration - College". "" Effective colleges F. ((("' Program Start Date ', current_date)) / 12 < 6 THEN 1 ELSE 0 END)


    I want to replace the current_date with scope of practice. Because the scope of practice is currently not in a date format (e.g. 201213, 201314, 201415), I need to use the TO_DATE and SUBSTR functions OBIEE equivalent to convert this field into a format that can be used by the TimeStampDiff function.

    The current (outside OBIEE) SQL for the conversion of the year at a date looks like this:

    To_date (substr (Fiscal_Year, 1, 4) |) '09', "YYYYMM")


    I tried to replace current_date in the column formula above by the following, but it didn't work:

    To this day (Substring ("registration - College". "D time". " "Exercise" FROM 1 to 4) | '09', "YYYYMM")

    TO_DATETIME (LEFT ("registration - College". "D time". " ("' Exercise ', 4) | ("/ 09/01 ', ' yyyy/mm/dd')

    Good course assuming that "registration - College". "D time". " "' Exercise ' is of type varchar, otherwise you will first need to cast as varchar or LEFT won't like it (but the error will tell you what the problem is exactly).

  • I always get requests to update on my office home page. After the most recent, most of my quick start icons are badges of adobe. Except a few functions are not open. When I right click on Firefox (for example) it says 'READ' instead of 'OPEN' and t

    I always get requests to update on my office home page. After the most recent, most of my quick start icons are badges of adobe. Except a few functions are not open. When I right click on Firefox (for example) it says 'READ' rather than 'OPEN' and then displays the Adobe error box. The only other answer I received (from Ask.com) is that the update was a virus. I'm not computor savy and my pc is quite old. I just want to come an hour before this recent action, but I can't open Norton power eraser or even the ability of the computer to return to an earlier point in time to cancel the action. Each of these attempts of task appears Adobe error box. I am currently showing Adobe Reader X 10,0

    Hi deanrlh,

    I apologize for the inconvenience caused. Please follow the steps in the below article mentioned: Application, file icons change in Acrobat/Reader icon

    Thank you

    Abhishek

  • My keyboard loses functionality when I try to leave comments on Facebook. Delete, BACKSPACE, apostrophe and cut, copy and paste are disabled.

    My keyboard loses functionality when I try to leave comments on Facebook.

    Delete, BACKSPACE, apostrophe and cut, copy and paste are disabled. This only happens in the comments, no functionality is lost in the mail or status updates.

    I disabled all my Add-ons and restarted Firefox and the problem persists. I've updated modules, restarted Firefox and the problem persists.

    I updated Firefox and that made no difference.

    I deleted the cookies and cache and still no luck.

    SOLUTION: I disabled the add-on Grammarly Lite and this seems to have solved the problem.

    I informed the Facebook of the show. I can't find any information about this problem in troubleshooting of Facebook.

    I can't reproduce this problem in Internet Explorer. All functions work fine.

    I have the same problem on another device that is running Windows 7 Starter and a laptop running Windows 8.1.

    Separate the issue;
    Shows details of the system;

    Plug-ins installed

    Shockwave Flash 15.0 r0
    Shockwave Flash 11.5 r502

    Having multiple versions of a program can cause problems.

    Take uninstaller from here:
    Uninstall Flash Player | Windows
    Uninstall Flash Player | Mac
    Reinstall the latest version.

    Flash Player v15.0.0. 239 http://get.adobe.com/flashplayer/

  • How to recharge my hard drive with photos that are stored in iCloud.  After installing a new hard drive, there's no pictures found in the Photos, and I get this error "cannot find system Photo library named"Library.photoslibrary Photos".

    How to recharge my hard drive with photos that are stored in iCloud?  After installing a new hard drive, there's no pictures found in the Photos, and I get this error, "could not find the picture of system library named"Library.photoslibrary Photos".

    Soon as your App Photos or iPhoto lost track of your photo library, or there has not been migrated from your old drive. You can create an empty library and probably enable iCloud photo library for photos to upload to the cloud.

    Designate a library in pictures - Apple Support System

  • My emails are not sent and I get an error message - error 550 server windows live mail error ID 0x800ccc79.

    My emails are not sent and I get an error message - error 550 server windows live mail error ID 0x800ccc79.

    Your help would be greatly appreciated

    Thank you

    original title: network

    Hello GerryBenjamin,

    The best place to ask your question of Windows Live is inside Windows Live help forums. Experts specialize in all things, Windows Live, and would be delighted to help you with your questions. Please choose a product below to be redirected to the appropriate community:

    Windows Live Mail

    Windows Live Hotmail

    Windows Live Messenger

    Looking for a different product to Windows Live? Visit the home page Windows Live Help for the complete list of Windows Live forums to www.windowslivehelp.com.

  • Age of Empires 2: Age of Kings does not work on Windows 7. The error is: could not initialize graphics system. Make sure that your video card and driver are compatible with DirectDraw.

    I can't get my Age of Empires 2: Age of Kings drive on my computer.

    It gives me the error message: could not initialize graphics system. Make sure that your video card and driver are compatible with DirectDraw.

    What exactly is DirectDraw. and how can I make my video card and the driver compatible to it. I already tried to uninstall and reinstall the drive.

    Help, please!

    What kind of graphics card you have and you have the latest DirectX and video card drivers? If this isn't the case, update them.

  • Locking XP! error "the system could not log. Make sure your username and domain are correct, then type your password again.

    Original title: Locking XP!

    I tried to read all the relevant messages and walked the Earth for this solution, if someone could help me I would be grateful.

    A dear friend died and I got his PC - a fast XP with SP3 which (elderly) she only used for web & email. His account has been "Judi".

    I noticed a while back that, on the logon screen, that there is another user called 'Fiona' (she told me an old co-worker who probably stayed with her).

    Now a friend in need of a very old HP PC Lions not having completely fortunately I managed to copy his files before he was insane - I offered this newer PC it after that I have "set up" for him.

    I put a new account in place on this new PC "Ken" has been added. Then, after the deletion of accounts Judi & Fiona, I cleaned the machine with MalwareBytes, CCleaner & defrag.  All is well now with only Ken appearing on the screen logon (with an image of the appropriate icon), that I used several times in the implementation of his e-mail account and move its acrossetc files. His password is empty.

    Being the only user now Ken, I thought that it strange would its user (only) one click each time to the 'Log in', so I searched and found a box that said something to the effect «... do not show a picture of connection...» » .  That started my problem!  Removing his login "icon" brings ONLY the following - FIONA!

    When connecting a Logon Message now says "the system could not log. Make sure your username and domain are correct, then type your password again.  Letters in passwords must be typed using the proper case" the choice for this error message is 'OK', which takes you to a login screen 'Type Win98' older Classic looking (no icon user) who was behind this logon Message, with (name) Fiona appears on the login screen (former) (full name and empty below the password) , with the choice to enter the password or a stop!

    Of course the password cannot be guessed (Yes - tried blank, admin, etc.) so the only choice is to stop.

    VA F8 at startup for 'Safe mode' goes to screen black WITH Fiona login screen as usual safe mode above and booting with the CD using NTPASSWD shows the usual 1) Administrator 2) 3) invited Ken and 4) Support Microsoft - NO FIONA is shown - and I put all these passwords to 'empty '. Of course repair and recovery repair 'R' does nothing on the removal of Fiona

    This translates the original message & Fiona connection again.  How can I return to screen "image icon" connection without losing files and mail Ken Ken. Where Fiona could hide when it is not a USER of the NET?

    Yet once again, I'd appreciate any help. Brian.

    You should be able to just select (click on) "Fiona", press the delete key, and then type any desired account name.  It doesn't work?

    If you cannot type on "Fiona" in the logon window, you can use the following procedure to modify the Windows registry... or you can take the computer to an independent repairer and ask them to fix it for you.  Don't go to a chain of stores, as a "geek squad" or BigBoxStoreUSA type of place.

    Go here--> https://www.raymond.cc/blog/how-to-edit-windows-registry-key-values-without-booting-in-windows/

    Choose method 1 or method 2.  I'm familiar with Hiren (method 2), but not with the program described in method 1 (even though it seems simple).  Any ISO file you choose, I suggest to download and use ImgBurn (free) to create your CD bootable from the downloaded ISO file.

    The registry key to change is in the same place as "userinit" (which is the example used in the article), so to follow 1-5 step method or method 2 for step 7.

    You will be at HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Winlogon

    In the right pane of the registry editor, you will see a large list of items.  Scroll down the page until you see LogonType and double-click it.

    In the "Value data" box, type 1, and click OK (1 is the same either hexadecimal or decimal).

    Close the registry editor, take the CD from the drive and reboot.  You should see the Welcome screen when Windows restarts.

  • I get e-mails and others are told that my mail box is full. When I send emails part only cross. Get error 450.

    say it error 450

    I get e-mails and others are told that my mail box is full.  When I send emails part only cross.

    Said e-mail message settings for your outgoing e-mail needs must be configured.  Time Warner told me 21/2
    hours later that it is a problem of Ms.
    They also tell me that the 'properties' in need of repair email.
    Dear God can someone help me?

    Your 'server' mailbox is full.

    Click on the Menu button. Options | E-mail accounts | Properties | Advanced. Uncheck: Leave a copy of messages on the server.

    Close and open WLMail. If the problem persists, log on to the Road Runner Webmail site and remove messages from the Inbox it.

    Windows Live Mail Forum
    http://windowslivehelp.com/forums.aspx?ProductID=15

  • Windows mail asking for user id and password but get error they are incorrect. When I go directly to the e-mail provider web site I can connect fine.

    Windows mail password username error

    all of a sudden windows mail asking userid and password but get error they are incorrect.  When I go directly to the web site of the email provider, I can log in fine so I know that the username and password are correct.  I also checked the in 'tools', 'options' 'connections '.

    Try to remove the account completely. Restart, and then add it again.

  • Error: the registry settings used by the iTunes for importing and burning CDs and DVDs are missing.

    Original title: the registry settings used by the iTunes for importing and burning CDs and DVDs are missing. This can occur as a result of installing other CD burning software. reinstall iTunes

    I've loaded and discharged Itunes 5 times and still get the same error message box. This error does exactly what he says, I can not burn anything in my itunes library. ITunes worked great in XP-3 no problems. It will not work on Windows 7-64.  I can download and play songs from any site, but can not burn anything.  And I don't have any other burning software on my CD PC

    Hello PohlCat,

    Given that you have uninstalled and reinstalled iTunes without correcting the problem, it may be with a 3rd party product causes a problem.

    I would look at the post here to see if this solution can help you. It's from a 3rd third party site, you should use at your own risk, because it has not been tested, but seemed to help others with the same error that you are experiencing.

    Please reply back and let us know if this can help.

    Sincerely,

    Marilyn
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • Can someone explain what are installation OS (C :) and a WinRE (r), and what are their functions?)

    Hi I do not know if I put in the correct title apologetic information if I don't.

    Can someone explain what are installation OS (C :) and a WinRE (r), and what are their functions?)

    I am not computer savvy and need help.

    The first has a red bar almost at the end of the box, the latter has a blue bar around to halfway along the area. Hope I gave enough information that someone explain it to me. Thank you.

    caz59

    Original title: hard drives

    The c: drive is where Windows is installed and is running from. The red bar indicates that the disk is full. You will need to do a cleaning to clean the computer and free urgent enough disk space. It may be more prudent to get some hands on assistance with this.

    WinRE is synonymous with the Windows recovery environment and contains an image of the computer, such as provided by the manufacturer. There will be a procedure to cross, which depends on the manufacturer as to what it is. The blue bar indicates there is little space left on the drive though use it to store files may stop the recovery process of work.

  • can not display the webpage error something about the Server internal and 500 are down for maintenance

    can not display the webpage error something about the Server internal and 500 are down for maintenance? Yahoo search option and can get to Web site but trying to post comments online and get this message.  tried to restart and got the same answer.  Just set Windows to update when I logged on tonight.

    Hi ginnypierson,

    Thanks for posting in the Microsoft community.

    I understand that you are facing the issue with can not display the webpage and you are wrong about 500 and internal server being down for maintenance.

    Before you start the troubleshooting steps, I need the information required

    1. what web browser do you use?

    2. have you made any changes to the computer?

    3. this problem occurs only with the particular website?

    Method 1:

    If you use Internet explorer, I suggest you to see link and check.

    Get help with the Web site (HTTP error) error messages.

    http://Windows.Microsoft.com/en-us/Windows-Vista/get-help-with-website-error-messages-HTTP-errors

    Method 2:

    I suggest you to see link and check.

    How to optimize Internet Explorer

    http://support.Microsoft.com/kb/936213/ro

    WARNING: Reset Internet Explorer settings can reset security settings or privacy settings that you have added to the list of Trusted Sites. Reset the Internet Explorer settings can also reset parental control settings. We recommend that you note these sites before you use the reset Internet Explorer settings

    Please follow these recommended steps, review the additional information provided and after back if you still experience the issue. I will be happy to provide you with additional options available that you can use to get this resolved.

  • What functions are part of the OLAP option, and what is considered "standard SQL"?

    Hello

    11.2 Enterprise Edition without OLAP license.

    Where can I find what functions are part of the OLAP option, which I'm not allowed to use without the extra cost of option?

    Not sure, what comes to my mind is such function as LISTAGG, CUBE, PARTITION BY and the like, but I would like a complete set so that we can ask our developers to avoid using functions that require an additional license.

    Thanks in advance

    None of the ones you mention are part of the OLAP option.

    The official license https://docs.oracle.com/cd/E11882_01/license.112/e47877.pdf document describes which includes the option.

    If you do not have him a license, then just make sure that it is not installed in the databases you create.

Maybe you are looking for