Operation with the current date in a query....

Hi all,
someone can give me some help.....
Do I have a wild query like this:
SELECT JOB_ID,
FROM MY_TABLE
WHERE ACTION = '....'
AND STATUS = '....'
AND DAEMONCODE = '....'
AND (CURRENT_DATE - TIMEINSERT) > 10
--> "10" represents the number of days
The last condition of Where is the one that I can not write properly ......
TIMEINSERT is a column of the table from which I run the query in FROM. TIMEINSERT is of type VARCHAR2 (17 CHAR) and the values are of the type that can take 20110217124105030
The first thing I should do is to transform the reading into a date using TO_DATE TIMEINSERT (........) of Oracle, but does not seem possible .....
And even if it is possible to solve this problem (current_date - timeinsert)> 10
Hi.
Flavio (from Venice)

With a correct format mask, it works:
SQL> select 1 from dual where current_date - to_date('15-MAR-11','DD-MON-RR') > 10;
1
1
SQL> select 1 from dual where current_date - to_date('15-MAR-11','DD-MON-RR') > 20;
no rows selected

Similar Messages

  • I deleted gardens of time yesterday and need to get it back with the current data and progress. Is this possible?

    I deleted gardens of time yesterday and need to get it back with the current data and progress. Is this possible?

    Is that on an iPad, iPod Touch or iPhone?

  • How to run webi report automatically with the current date/system date in webi report

    Hi Friends,
    I have a webi report which has a date prompt now. Based on the selection that user makes while running a report, he will get the related data for that particular date selection. Now I want to make that date prompt automated that is the report should run automatically based on the system date daily on scheduling.
    I want it to run current day automatically without have to go in and pick the date in webi report. I will be scheduling the webi report. Can you please let me know how to achieve this functionality of running a webi report automatically with a system date.
    Please let me know if I couldn't make you understand so that I will write with an example.
    Waiting for your valuable solutions.
    Thanks in advance.
    Regards,
    Bhaskar

    Hello Bhasakar,
    1.Create sysdate object in the universe
    2.Create another query in webi and select only sysdate object
    3.In the original query drag the Day object in the filter pane and choose the "List of values" from another query.and select the sysdate object from the second query.
    So your report always will run for sysdate...
    regards,
    Naveen D

  • I need help highlighting an expiration date on my Numbers '09 spreadsheet. I want the text/fill of a cell to change color when the expiration date of an item is within 180 days of the current date.

    I need help highlighting cells on my Numbers '09 spreadsheet.  I want the cell text/fill to change color when the date is 180 days or less from the current date.  I already have a cell with the current date in it.  I also know how to change the fill/text colors.  All the cells have been formatted to show date only.  I am having trouble with the formula.  I can get to the Conditional Formatting menu and select "With Dates" but after that I am lost.  Can anyone help?
    Thank you for any assistance.
    B

    Set a Conditional Format rule as shown in the illustration below. The rule has been applied to all dates in column B of the table.
    Regards,
    Barry

  • Can I make a checkbox populate the current date?

    I've been asked to make a form that has quite a few checkboxes.  These checkboxes also need to be marked with a date when checked off.
    Rather than have the person filling out the form type the date every time they check the box, they request that when the user clicks the checkbox that a current date show next to the checkbox.
    I don't know if this can be done with a current date stamp or with having a text box that populates with the current date, etc.
    The forms are also going to be used throughout multiple days, so I can't just call on a "current date" and show/hide that text box like I had originally thought to do.
    I'm also really green to scripting so any help or guidance in the right direction would be much appreciated.
    Thank you.

    The following Mouse Up script for a check box will set the associated text field to the current data when it's selected, and blank the field when not:
    // Mouse Up script for check box
    (function () {
        // Get a reference to the text field
        var f = getField("text1");
        // Set the value of the text field
        if (event.target.value !== "Off") {
            f.value = util.printd("mm/dd/yyyy", new Date());
        } else {
            f.value = "";
    Replace "text1" with the name of the associated text field.

  • How to compare date with thr current date

    Hi,
    I have an inout string which is in date format(dd/mm/yyyy hh:mm:ss) .
    what i need to do is comparing this date string with the current date. if my input string is less than current date , then display error message..
    how to do this?
    regards

    Excellent suggestions from all of you people!
    finally i got the solution
    code is:
    import java.util.*;
    import java.text.*;
    public class TestDate {
      public static void main(String args[]){
        TestDate a = new TestDate();
      TestDate() {
        String DATE_FORMAT = "dd/MM/yyyy hh:mm:ss";
         Date today = new Date();
         Date myDate=null;
        java.text.SimpleDateFormat sdf =
             new java.text.SimpleDateFormat(DATE_FORMAT);
         try{
         myDate = sdf.parse("01/06/2006 00:00:00");
         }catch(Exception e) {System.out.println(e);}
        Calendar c1 = Calendar.getInstance();
        Calendar c2 = Calendar.getInstance();
        c1.setTime(today);
        c2.setTime(myDate1);
        System.out.print(sdf.format(today));
        System.out.print(sdf.format(c1.getTime()));
        if (c1.before(c2)) {
           System.out.print(" is before ");
        if (c1.after(c2)) {
           System.out.print(" is after ");    
        if (c1.equals(c2)) {
           System.out.print(" same as ");    
    System.out.print(sdf.format(c2.getTime()));
      }

  • My iphone is synced and backed up with another computer which is now broken... and i have synced it with a new one but when i want to do anything itunes says all data will be erased and replaced with the current itunes library?what do i do?

    my iphone is synced and backed up with another computer which is now broken...i have synced it with my new computer  but it hasnt transfered anything over to itunes and when i try to add anything to my iphone it says all data will be erased and replaced with the current itunes? i dont want to lose all my apps and music.... i dont know how to go around this problem? i want to back it all up and sync it properly to my new computer so that is now my main computer , so i can add ring tones and music etc with out it erasing everything ive got. any answers would be great and muchly appreciated. thanks, im not sure what operating system my iphone has either.....

    It has always been very basic to always maintain a backup copy of your computer for just such an occasion.
    Use your backup copy of your computer to put everything on the new one.
    It sounds like you have failed to do this, which is not good at all.
    You will have to transfer your itunes purchases from your iphone.  Authorize your computer for your itunes account 
    About iTunes Store authorization and deauthorization
    Open itunes, plug in iphone, do NOT sync, click File>Transfer Purchases
    When you do sync you will lose your pics ( photo library - synced from your old computer), your itunes content ( music, apps, videos,etc) , your contacts and your calendars.  So do NOT sync yet.  This is why a backup copy is so important.
    Enter one unique contact and calendar entry on your computer.
    When you first sync, you should get the option to merger the data.  Choose it.
    If you want your pics, then you will need to e-mail them to yourself before you sync.  They will not be of the original quality as they are reduced when synced to iphone.
    When all is as goos as it can be, then backup your computer, and always maintain the backup.

  • Time and date on the laptop is not in accordance with the current.

    1. Product Name and Number
    HP G42-360TX
    2. Operating System installed (if applicable)
    Windows 7 64-bit
    3. Error message (if any)
    Time and date on the laptop is not in accordance with the current
    4. Any changes made to your system before the issue occurred
    before, I installed windows 7 32bit is no problem, but when i install win 7 64bit new problem emerged.
    Time and date on the laptop is not in accordance with the current. I've tried to change it manually, but it will change back to yesterday's date.
    before, I installed windows 7 32bit is no problem, but when i install win 7 64bit new problem emerged.
    whether it was the CMOS battery is weak? when I bought the notebook in 2011

    Have you tried setting it to synchronize with an internet clock...click the date in the lower right corner...change date and time settings...internet time. Also check the time zone.

  • Cannot open your default e-mail folders. You must connect to Microsoft Exchange with the current profile before you can synchronize your folders with your Outlook data file (.ost)

    Fresh installation of Exchange Server 2013 on Windows Server 2012.
    Our first test account cannot access their email via Outlook but can access fine through OWA. The following message appears - "Cannot open your default e-mail folders. You must connect to Microsoft Exchange with the current profile before you can synchronize
    your folders with your Outlook data file (.ost)" is displayed.
    If I turn off cached Exchange mode, setting the email account to not
    cache does not resolve the issue and i get a new error message - "Cannot open your default e-mail folders. The file (path\profile name).ost is not an Outlook data file (.ost). Very odd since it creates its own .ost file when you run it for the first
    time.
    I cleared the appdata local Outlook folder and I tested on a new laptop that has never connected to Outlook, same error message on any system.
    Microsoft Exchange RPC Client Access service is running.
    No warning, error or critical messages in the eventlog, it's like the healthiest server alive.
    Any help would be greatly appreciated. I haven't encountered this issue with previous versions of Exchange.

    So it looks like a lot of people are having this issue and seeing how Exchange 2013 is still new (relatively to the world) there isn't much data around to answer this. I've spend ALOT of time trying to figure this out.
    Here is the answer. :) - No I don't know all but I'm going to try to give you the most reasonable answer to this issue, in a most logical way.
    First thing I did when I was troubleshooting this issue is that I ignored Martina Miskovic's suggestion for Step4 http://technet.microsoft.com/library/jj218640(EXCHG.150)because it didn't make sense to me because I was trying to connect
    Outlook not outside the LAN but actually inside. However, Martina's suggestion does fix the issue if it's applied in the correct context.
    This is where the plot thickens (it's stew). She failed to mention that things like SSL (which I configure practically useless - anyone who ever worked in a business environment where the owner pretty much trusts anyone in the company, otherwise they don't
    work there - very good business practice in my eyes btw, can confirm that...) are some sort of fetish with Microsoft lately. Exchange 2013 was no exception.
    In exchange 2003, exchange 2007 and exchange 2010 - you could install it and then go to outlook and set it up. And when outlook manual Microsoft Exchange profile would ask you for server name, you would give it and give the name of the person who you setting
    up - as long as machine is on the domain, not much more is needed. IT JUST WORKS! :) What a concept, if the person already on premises of the business - GIVE HIM ACCESS. I guess that was too logical for Microsoft. Now if you're off premises you can use things
    like OutlookAnywhere - which I might add had their place under that scenario.
    In Exchange 2013, the world changed. Ofcourse Microsoft doesn't feel like telling it in a plain english to people - I'm sure there is an article somewhere but I didn't find it. Exchange 2013 does not support direct configuration of Outlook like all of it's
    previous versions. Did you jaw drop? Mine did when I realized it. So now when you are asked for your server name in manual outlook set up and you give it Exchange2013.yourdomain.local - it says cannot connect to it. This happens because ALL - INTERNAL AND
    EXTERNAL connection are now handled via OutlookAnywhere. You can't even disable that feature and have it function the reasonable way.
    So now the question still remains - how do you configure outlook. Well under server properties there is this nice section called Outlook anywhere. You have a chance to configure it's External and Internal address. This is another thing that should be logical
    but it didn't work that way for me. When I configured the external address different from the internal - it didn't work. So I strongly suggest you get it working with the same internal address first and then ponder how you want to make it work for the outside
    users.
    Now that you have this set up you have to go to virtual directories and configure the external and internal address there - this is actually what the Step 4 that Martina was refering to has you do.
    Both external and internal address are now the same and you think you can configure your outlook manually - think again. One of the most lovely features of Outlook Anywhere, and the reason why I had never used it in the past is that it requires a TRUSTED
    certificate.
    See so it's not that exchange 2013 requires a trusted certificate - it's that exchange 2013 lacks the feature that was there since Windows 2000 and Exchange 5.5.
    So it's time for you to install an Active Direction Certificate Authority. Refer to this wonderful article for exact steps - http://careexchange.in/how-to-install-certificate-authority-on-windows-server-2012/
    Now even after you do that - it won't work because you have to add the base private key certificate, which you can download now from your internal certsrv site, to Default Domain Policy (AND yes some people claim NEVER mess with the Default Domain Policy,
    always make an addition one... it's up to you - I don't see direct harm if you know what you want to accomplish) see this: http://technet.microsoft.com/en-us/library/cc738131%28v=ws.10%29.aspx if you want to know exact steps.
    This is the moment of ZEN! :) Do you feel the excitement? After all it is your first time. Before we get too excited lets first request and then install the certificate to actual Exchange via the gui and assign it to all the services you can (IIS, SMTP and
    there is a 3rd - I forgot, but you get the idea).
    Now go to your client machine where you have the outlook open, browse to your exchange server via https://exchang2013/ in IE and if you don't get any certificate errors - it's good. If you do run on hte client and the server: gpupdate /force This will refresh
    the policy. Don't try to manually install the certificate from Exchange's website on the client. If you wanna do something manually to it to the base certificate from the private key but if you added it to the domain policy you shouldn't have to do it.
    Basically the idea is to make sure you have CA and that CA allows you to browse to exchange and you get no cert error and you can look at the cert and see that's from a domain CA.
    NOW, you can configure your outlook. EASY grasshoppa - not the manual way. WHY? Cause the automatic way will now work. :) Let it discover that exachange and populate it all - and tell you I'm happy! :)
    Open Outlook - BOOM! It works... Was it as good for you as it was for me?
    You may ask, why can't I just configure it by manual - you CAN. It's just a nightmare. Go ahead and open the settings of the account that got auto configed... How do you like that server name? It should read something like [email protected]
    and if you go to advanced and then connection tab - you'll see Outlook Anywhere is checked as well. Look at the settings - there is the name of the server, FQDN I might add. It's there in 2 places and one has that Mtdd-something:Exchange2013.yourdomain.local.
    So what is that GUID in the server name and where does it come from. It's the identity of the user's mailbox so for every user that setting will be different but you can figure it out via the console on the Exchange server itself - if you wish.
    Also a note, if your SSL certs have any trouble - it will just act like outlook can't connect to the exchange server even though it just declines the connection cause the cert/cert authority is not trusted.
    So in short Outlook Anywhere is EVERYWHERE! And it has barely any gui or config and you just supposed to magically know that kind of generic error messages mean what... Server names are now GUIDs of the [email protected] - THAT MAKES PERFECT
    SENSE MICROSOFT! ...and you have to manage certs... and the only place where you gonna find the name of the server is inside the d*** Outlook Anywhere settings in the config tab, un it's own config button - CAN WE PUT THE CONFIG ANY FURTHER!
    Frustrating beyond reason - that should be Exchange's new slogan...
    Hope this will help people in the future and won't get delete because it's bad PR for Microsoft.
    PS
    ALSO if you want to pick a fight with me about how SSL is more secure... I don't wanna hear it - go somewhere else...

  • How to delete all previous icloud data from current icloud after sighning in with the current icloud account

    so i sighned into someone elses device with the current icloud account and i sighned out. Some of the icloud data from the other device is now on mine. All i want to know is how to delete all the icloud data in my current icloud account from the other icloud account

    Hello ,
    I had the same problem and i have done everything manually.
    It's a shame that Apple doesn't put a "Reset to factory Settings" button or simply "Delete all data from iCloud.com". That way, it would be much simpler for everyone including myself.
    Winston Churchill is right unfortunately . Happy deleting !
    Kind Regards,
    Moonburn

  • I would like to format cells with time only.  when I enter a time of day the current date is still in the cell which is not necessarily so

    I would like to format cells with time only.  when I enter a time of day the current date is still in the cell which is not necessarily so.  THere are  no options for just  date .

    christine275 wrote:
    ... (this is a time worked by date and not always entered on the date worked)--
    "Time" in Numbers is always "Time of Day", and is always part of a Date and Time value. "Amount of Time" is a Duration value, which may be displayed in a similar format to "Time of Day," but is a different type of value.
    If you are entering the number of hours and minutes worked, format the column as Duration, set the units and the format in which you want to have the value appear.
    The Date column will still contain a Date and Time value (Jan 1, 2011 00:00:00 in the cell shown in the example), but the "Time Worked" cells will contain only a Duration value.
    Incidently, the Date in A2 was entered as "jan 1" (without the quotes). Numbers automatically adds the current year and the default time value, then displays the result in the closest format to what you've entered, or in the Date and Time format you have chosen.
    The Duration value in B2 was entered as 3:15 (as displayed). Note that in the entry bar the duration is displayed as 3h 15m, probably to distinguish it from a similarly formatted (Date and) Time value.
    Regards,
    Barry

  • How to get the query output depending on the current date

    i created a region of type "query",inside it created region using wizard of type "table" . in the query i filter the data depending on the current date (taken from dual table) . but still it showing no output on the page. i run the same query in the toad and its showing the 2-3 rows.
    If anybody know where the problem is then do inform me.
    thanks in advance.

    i got the answer by trying out in OAF

  • My iCloud calendar interacts with all of my iOS devices showing the current date, but on my iPad the rest of the calendar is blank.  Any suggestions?

    My iCloud calendar interacts with all of my iOs devices showing the current date, but on my iPad the rest of the calendar is blank.  Any suggestions?

    I can help you for the future.  Regularly back up your computer to an external hard drive (or cloud alternative).  If you have your library backed up, it could be reinstalled on your new computer.  In your current situation, you will have to reload all of your CDs as syncing of non-iTunes purchased music is only one way (Computer to iPod)

  • How to display the current date in the prompt value.

    Hi,
    How to display the current date in the prompt value. When the user runs the query he want the current date to be displayed in the prompt value and he should also be able to change the date if required ...... I am using web Intellegency BO XI3.0.
    Thanks,
    Shakthi.

    Please refer the below link.
    Prompt  with  default  date   (  currentdate-1  and current date-8)
    http://www.dagira.com/2008/07/15/how-can-i-make-today-my-default-prompt-value/
    http://www.dagira.com/2008/07/21/using-a-magic-date-value-in-prompts/
    Regards,
    Bilahari

  • Unable To Reserve Lots that are Expiring Later on the Current Date

        Hi Guru's,
           An item has an expiry date of 12-APR-2015 23:59:59.But it got expired, from 12-APR-2015 00:00:00 the lot shows an (Available To Reserve) ATR as 0 on the Onhand Availability , although the onhand quantity and Available To Transact (ATT) show the quantity.As per expiration date expiration of lots should starts from the date stamped on it and the timestamp doesn't really play a role.
    Seen the note:  Unable To Reserve Lots that are Expiring Later on the Current Date through Auto Detailing get Error of Could not Query Reservations (Doc ID 1193423.1).
        But the solution provided is confusing, as in a R12.1.3 inventory implemented environment we cannot find the options to set picking rules with Lot --> Exp Date >= Expression --> Trunc(sysdate).It would be great if any body can let me know the solution.
    Rgds,
    Sri.

    Hello,
    InContext Editing does no longer support HTTP authentication method, as the release notes state. As a result, users will not be able to edit sites, folder or pages that are password protected.
    Currently we do not have a workaround for this issue and we recommend removing the password protection. The issue has been added on our feature list but we do not have a proposed timeframe to fix it.
    Thank you,
    Florin

Maybe you are looking for

  • Why are BC objects created in user's schema

    Server = Sun Sparc SunOS 5.8, Oracle 8.1.7.4 SID Client = Windows 2000, Oracle 9iDS (v9.0.2 w/Jdeveloper v9.0.3) Network = 100MB TCP/IP I have a schema with relatively large (in my mind) tables master = 225,000 records; detail = 1,200,000 records. I'

  • ITunes won't detect my iPhone 4

    I currently use a MacBook Pro with the 12.0.1 version of iTunes, however I also have an iPhone 4 and recently got an iPhone 5. In order to backup my iPhone 4 and put it onto the 5 i need to be able to sync, but iTunes won't detect my device (iPhone 4

  • How can i send music, vodeo and apps to my iphone

    Hi

  • Thumbnail tearing in LR 4.4 (Mac)

    Sicne upgrading to LR 4.4, I get image tearing on thumbails about 10% of the time while scrolling. I'm on a 2012 Mac Pro (6-core) with the ATI Radeon HD 5870, running 10.8.3 (thogh this was happening when I was on 10.8.2 also). I assume this is a pro

  • Sound just stopped working!

    Ok, so I opened imovie 08 today for the first time on my macbook pro today. I imported about 6 movies, and went to work on editing them, which was i pain because i was used to the last version, I worked for nearly 2 hours, finished the quick project