Dates and adding an hour

Hi!
I have been trying to check a date column for dates that occur before a certain date plus one hour.
Let's say that I want to find all dates before 2002-aug-12 12:00 and all dates before said time plus one hour.
Anyone know of a simple way to do this, I am kinda stuck.
Regards,
Nisse Marcusson

SELECT date_column
FROM table_name
WHERE date_column < TO_DATE ('2002-aug-12 12:00', 'yyyy-mon-dd hh24:mi') + 1/24

Similar Messages

  • Date and time 12 hours off

    The date and time are 12 hours off on all my Idevices (Ipads and I pod touches), YET the time is correct on my Iphone and all my computers and my router.  The date/time are set to generate automatically.  When I turn this feature 'off' the time immediate changes 12 hours back to the correct time.  However, synchronized events on my calendars (say, with gmail calendar) remain 12 hours off.  I have no idea what is going on.  I had thought this may have something to do with my wi-fi and/or router, but the 'automatic' date/time change regardless of whether wi-fi is even on or off on the devices.  Also, I can't figure out why the Iphone would have the right time when the other devices all have the time off by 12 hours.  Any ideas

    Thanks, but something is still wrong.  I have tried to set the date and time manually and this does fix the general time on the Idevice; however, programs such as weather and the calendar still show events 12 hours when they synch to gmail calendar. So something about the Idevice is still telling the device it is 12 hours off even though I have set the date/time manually. 

  • CF8, Mysql, Date and Time 1 hour behin

    Hi Guys we have CF8, and we are using Mysql 5.0 the
    connection with the database is perfect
    but we have a very estrange problem we store date and time
    information into the database
    when we query the database we get the right information
    however when the coldfusion script
    show the result in the web the information is 1 day behind,
    I've been looking around in the CF8 administration to see if I can
    change some settings without any success.
    Example:
    eventID eventType eventVenue eventDetail eventStart
    eventstartTime eventEnd eventendTime eventLevel eventActive eventTS
    2 5 1 spec shares @ college 2008-03-19 14:00:00 2008-03-19
    16:00:00 1 yes 2008-03-12 17:00:26
    3 2 1 intro @ college 2008-03-20 10:00:00 2008-03-19 16:00:00
    1 yes 2008-03-12 17:22:59
    of interest are the time and date columns eventStart,
    eventstartTime, eventEnd, eventendTime - please note the values
    retrieving that information (without modification) via
    coldfusion are 1 day behind for dates (actually 1 hour behind) and
    1 hour and 1 minute forward for time
    2 5 1 spec shares @ college Mar 18 2008 23:00 15:01
    18-03-2008 17:01 1 yes
    We reproduce the problem in Windows or Linux so we believe
    it's a problem with the coldfusion
    can you give us any advise ?
    Regards
    Ivan

    I don't think the problem with with CF. In addition to the
    server's timezone, which JVM are you using? You need to at least
    1.4.2_11 to account for the recent change in daylight savings time.
    http://kb.adobe.com/selfservice/viewContent.do?externalId=d2ab4470

  • Difference between two dates and time in hours

    Hi,
    I have fields contains start date, start time, end date, end time.
    How do I calculate the number of hours since start date, start time and end date, end time
    Start date : T_DATE1
    Start time : T_TIME1
    End Date : T_DATE2
    End Time : T_TIME2.
    Please help
    Moderator Message: Date and Time questions are not allowed in this forum. The reason being they have been asked and answered many times here. Please search for relevant information here.
    Edited by: kishan P on Dec 16, 2011 12:02 PM

    Hi,
    Please find the FM - DELTA_TIME_DAY_HOUR,
    this will give you the time in minutes, hence you can convert it to hours.
    Please note the below links;
    Moderator Message: Link-farm removed. Please dont do that again.
    Hope you will search SDN next time, before posting.
    And too hope that this will help you
    Thanks & Regards
    Manu S
    Edited by: kishan P on Dec 16, 2011 12:03 PM

  • Converting days into hours and adding this hour to the time

    Hi Gurus!
    I ahve  a query that outputs the total time between two periods in one column , total number of days between two periods  in onne column. I want to combine those together and show it in hours . For example if the time column shows 7:41(7 hours  and 41 minutes ) and teh days column shows 1 day , I want to combine those two columns and show as one column i.e 24 hours plus 7 hours and 41 minutes as a total of 31 hours and 41 minutes. I had written the follwwing code in the query that calculated the two seprately , can anyone please tell me how to go about converting this hour into time format and then adding the two to get it in total number of hours and minutes in my query.
    concatenate vttk-datbg vttk-uatbg into lv_start_time.
        concatenate vttk-daten vttk-uaten into lv_end_time.
        gv_ftstm = lv_end_time - lv_start_time.
        gv_total_time = gv_ftstm+8(6).
        if not ( vttk-datbg is initial
              or vttk-daten is initial ).
          gv_total_days = gv_ftstm+0(8).
        else.
          clear: gv_total_days.
        endif.
        if not p_bl_lns is initial.
          read table gt_vttk with key tknum = vttk-tknum.
          if sy-subrc <> 0.
            append vttk to gt_vttk .
          else.
            clear: vttk-distz,
                   vttk-gesztda,
                   vttk-fahztda,
                   vttk-warztda,
                   gv_total_days,
                   gv_total_time.
          endif.
        endif.
    The gv_total_days have been declared as type P lenght 6, outlenth 10 and decimal 02, and
    gv_time as VTTK-FAHZTDA.
    Thnaks

    Does this help ?
    CONVERT DATE par_date TIME par_time INTO
              TIME STAMP par_timestamp TIME ZONE par_time_zone.
    also use fm:  SD_DATETIME_DIFFERENCE
    01/01/2009
    12:00:00
    01/02/2010
    11:00:00
    output:                             365
                                 23
    365 * 24 = tine in Hrs + 23 hrs

  • Extracting time from date and adding it to another date.

    Dear All,
    The values of two fields in my table are as follows:
    n_date n_time
    12/7/2007 1/1/1970 5:50:23 PM
    Both of these fields are of date data type.
    How can i add the time from n_time to n_date so that n_date will reflect a date with time added?
    The problem is that i want to sort on n_date and i am not getting result when two dates are having same values for n_date but different for n_time.
    How can i create a new expression for sorting these values?
    Thanks in advance.
    Regards,
    Sameer

    Hi,
    Check this.
    with data as
    ( select to_date('12/7/2007','dd/mm/yyyy') as ndate, to_date('1/1/1970 5:50:23','dd/mm/yyyy hh24:mi:ss') ntime from dual)
    select ndate + (ntime - trunc(ntime)) from data
    Regards
    RK

  • Comparing two dates and adding days to date

    Hi,
    I want to compare two dates(like 2006/10/21 and 2006/11/2),how can i compare these two dates,like which is greater.And if to the second date,i want to add some number of days like 10 days,how can i add so that the date becomes 2006/11/12).
    Please reply soon.Thanks

    No,all other queries are different,as they have the
    date in this format
    '2006-03-06 " but i have the date in this format
    "2006-03-06 10:26:46.0",
    i.e the time is also assciated with it.
    If I have only the date(in string format or date
    date format 2000/12/1),then I can easily do it,but
    I have the time also.If I have the date only,then I
    can split the date into three strings,and after
    converting into integer I can pass it to the
    constructor,but what about the time?SimpleDateFormat can parse "2006-03-06 10:26:46.0" date too:
               SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss.SS");
               Date date = dateFormat.parse("2006-03-06 10:26:46.0");
               System.out.println("date = "  +date);

  • Calculation of Date and Time Keyfigure

    Hello Experts,
    I want to get the result out of two keyfigures with different data type. One keyfigure has the data type TIMS and the other DATS. Is it possible to calculate the following:
    Result =  (Keyfigure1 TIMS + Keyfigure2 DATS) - (Keyfigure2 TIMS + Keyfigure3 DATS)
    Thanks in advance for your help.
    AK
    Edited by: Siegfried Szameitat on Nov 5, 2008 3:52 PM

    Anastasios Kozas,
    Out put(Result) you need in days or hours..?
    Eg: For Hours: find difference between hour keyfigures + difference between date and convert to hours.
    Then it works.
    Srini

  • Selection Screen - Date and Time

    Hi,
    I have given a selection screen where the user needs to key in the input in the following format
    dd.mm.yyyy hh:mm:ss.
    Reason is that the database fetching these elements accepts only in this criteria.
    Now as they look into automating this program, they would want to automatically take the current system date and time - 24 hours .
    How do I achieve this in the above format? If this is not possible, let me know if i can make the selection screen with normal sap date format and convert it to the above format on passing to the select statement.
    Regards
    Sam

    Hi Sam,
    See this. Is this your requirement.
    With this we are able to get Current time-stamp to selection parameter.
    REPORT ZTEST.
    DATA: L_TS TYPE TZNTSTMPS,
           L_TS_C TYPE CHAR14.
    PARAMETERS:
    P_TMSTMP TYPE TMSTMP OBLIGATORY MEMORY ID TEST.
    INITIALIZATION.
       GET TIME STAMP FIELD L_TS.
       MOVE L_TS TO L_TS_C.
       SET PARAMETER ID  'TEST' FIELD L_TS_C.
    The output is
    Jogeswara Rao K

  • Date and time restriction

    Hi,
    I have dragged and dropped the Date/Time field from the Library into the adobe forms. When I go to the PDF Preview mode I can able to see the date for the n number of years. But my req. is to display only 2 months from the current month.
    Can you help me out?.
    Thanks
    GJ

    Thanks for your response. I have done the validation, If the user select more than 60 days from the current date I raised the popup message. Just I took the month from the current date and added 2 on it and checked the value. If it exceeds I have populated the value. Is this the way to do the validation.
    If that works for you, it is fine with me. I cannot see a problem:))
    And also one more thing If the user selects some wrong value we raised the popup message But value is sitting on the text box. How to clear the value.. Can we use "clearItems" or any other syntax. I tried with clearItems It doesnt work.
    you must only address the field (for example using this, parent etc.) to delete correctly and then use field.rawValue = "";
    Do you remember we have discussed the issue about helping others? What is your record? Can you show some contributions you have made to pay back the effort of people helping you? Just wonder if you have listened to me or just ignored me...
    regards Otto

  • IMovie 9.0.8 "date and time" Title is 5 hours off original footage.

    Since iMovie doesn't import the original Date and Time that the footage was recorded, I have been using the "date and time" Title feature, which in prior versions has worked well. Since updating to ML and iMovie 9.0.8, the time is off by approximately 5 hours. I can usually correct this by adjusting the date and time in the frame but it's an extra step I'd rather avoid. Has anyone else experienced this glitch? Is there a fix?

    ablyes wrote:
    …i already tried a frensh install of mountain lion
    I recommended a re-install of the app, not of the OS
    …  what do you mean by adding some MacOS Voodoo ?
    do, what I wrote: re-launch your Mac while holding down the shift-key
    this triggers the Safe-Mode, which is recommended by Apple as a maintanance-routine  (best done before any updatres) ....
    I called it 'voodoo' as some joke ...

  • The "More Everything Plan" is ruining my life!  (and adding random data charges to my bill)

    Hello,
    I recently changed my data plan a few months ago to the 6 GB Data plan with 2 phones tied to my service when I upgraded my phone to the Samsung Galaxy 5.  For the most part my wife and I have been doing pretty good at keeping the our monthly data usage down to the 6 GB.  On Nov 4th was I upgraded to the new 10 GB my everything plan and ever since that change, my account has been making RANDOM data charges at all hours of the night!  I pulled both my wife's Data Usage report and my own and compared them. 
    Looking at my wife's data usage below, you can clearly see that there are automated data spikes that her phone went through on the same exact time on different days!  Looking at the dates, these spikes did not start to automatically occur until we upgraded our plan on Nov 4th.  The same goes for my data usage below.  There are multiple days that my phone surged on the same exact time with large spikes of data!  These reports were organized by largest "Unbilled Data Usage" spikes.
    These spikes SHOULD NOT be occurring and have nothing to do with what apps we have installed our phones.  We have both filtered our usage by apps on our phones and they do not add up.  What's the point of having a larger data plan, if that data plan just steals MG randomly off your phone for no reason???  Because of these spikes, I have add to pay over $100 in overage fees and in November, I have already had to buy MORE DATA ($20 for 5 GB more) because I was already at 90% of my usage with 2 weeks still to go in the billing cycle!  I need actions and not suggestions.  I'm not the only one with these problems and this needs to be addressed.
    Please help!!!!!
    (Wife's Data Usage)
    (My Data Usage)

    You're right, data usage can be confusion...especially when your response above doesn't make sense.
    If data usage is counted in 6 hour blocks, then how in the world did Nov. 5th last 138 hours???  Data was calculated 23 times on 11/5/14 and 14 times on on 11/4.  These are just 2 examples of when the data was pulled in in "6 hour blocks of time". Nearly every day in my pulled report this month shows 2 dozen or more times the data was recorded and billed each day. (see below)
    Further more, if data usage actually was counted in 6 hour intervals, that still doesn't explain why my phone randomly surged 1.27 GB of data at 5:36 AM in the morning on 11/12/14.  Even if this counted data since 11:36 PM the night before on 11/11/14 night, there's no way I would have used this much data!  Since I work during the weekdays 9-5, I am already in bed at this time and not using my phone.  And it can't be recorded data usage after 5:36 AM, because then what would be the point of having a time stamp in the report?  Where was this data coming from???  (see below)
    The timing of my spike in data is just way too coincidental of when I upgraded my data to 10 GB earlier this month.  If you compare our data usage against other months (when I had 6 GB) we didn't have random spikes like we are seeing now.  There is something wrong with the new data plan on our phones, and I really wish someone could clearly point out where these additional charges are coming from.  Please have a representative contact me at your earlier convenience.
    6 Hour Blocks of Time?
    Data pulled at 5:36 AM
    Data Spike in the Past Months

  • I am looking for a timer that shows elapsed time since a particular date and time.  Showing days, hours, minutes etc.

    I would like to download an application for my desktop and maybe even my iphone that will tell me how many days, hours, minutes, etc have elapsed since a particular date.
    For example, my brother just had a baby and I want to put that date and time into the app and then determine how long it has been since that date and time.
    Hopefully this makes sense, because I have not been able to locate anything.
    Thanks in advance,

    This is fantastic.  Thank you.
    Is there any way to have something like this displayed on my desktop showing the time as it ticks away?

  • I just plugged in my Iphone after 4 weeks of downloading music and adding contacts around 400 to be excact and it whipped all my data out and I have no photos nothing reset to factory defult and I cannot even listen to music I purchased because it skips

    I just plugged in my Iphone after 4 weeks of downloading music and adding contacts around 400 to be excact. When I plugged it in my computer it started to sync with iTunes and it whipped all my data out. I have no photos contacts nothing, so I then in a rage reset to factory defult and I cannot even listen to music I purchased because it skips. I just want my phone back

    Was this the very first time you ever plugged the phone into that computer?
    Did you pay attention to the prompts you were given when you plugged it in?
    Did you have iCloud backups turned on before you did this?  I hope so... If you did, restore the phone from the last iCloud backup from before you wiped it. If not, then the photos, etc. are gone. Apps and music can be re-downloaded.

  • Adding one day to a oracle.jbo.domain.Date and truncating the time part

    JDev 11.1.1.4.0
    Hello
    I need to add a day to oracle.jbo.domain.Date and get back a oracle.jbo.domain.Date without the time part.
    So far I've got
    Date valueDate = (Date)rowCpt.getAttribute("ValueDate");                                       
    Calendar cal = Calendar.getInstance();
    cal.setTime(new java.util.Date(valueDate.timestampValue().getTime()));
    cal.add(Calendar.DATE, 1);
    Date newDate = new oracle.jbo.domain.Date(new Timestamp(cal.getTime().getTime()));This adds 1 day to the date but keeps the time part of the date.
    How do I get rid of the time part of the date ?
    Thanks
    Paul

    The Calendar class allows you to set or clear each field.
    Date valueDate = (Date)rowCpt.getAttribute("ValueDate");                                       
    Calendar cal = Calendar.getInstance();
    cal.setTime(new java.util.Date(valueDate.timestampValue().getTime()));
    cal.add(Calendar.DATE, 1);
    cal.clear(Calendar.HOUR);
    cal.clear(Calendar.MINUTE);
    cal.clear(Calendar.SECOND);
    cal.clear(Calendar.MILLISECOND);
    Date newDate = new oracle.jbo.domain.Date(cal.getTimeInMillis());should work.
    Timo

Maybe you are looking for

  • Robocopy bug with /b switch

    Robocopy without /b is able to copy files which are currently open (e.g. a Word document open in Word). Robocopy with /b is not able to copy these same files. Steps to reproduce: Prerequisites: your user account is an administrator (in a domain, you

  • Cracked MacBook Pro 13"

    My house got robbed two weekends ago. Sadly, my old computer was stolen and I had to buy a new MacBook Pro. My dog ended up jumping on top of my new computer, ruining the screen. It is black on the top left corner of the computer. On top of that, the

  • How do I tell Firewire 400 vs 800 ports

    The manual just says "if you have". The two firewire ports on the back look the same. I have the white 20" iMac, about a year old or so. I'm looking to get an external hard drive for backups, and I assume Firewire 80 is the way to go.

  • How can I change the margin for the header/footer?

    The header/footer are about .5 from the top/bottom but I want them at about .3/.4. How can I change this?

  • TypeError: Error #2022: Class DS0$ must inherit from DisplayObject to link to a symbol

    Hello, When I tried AIR 3.7.0.1410 (ASC 2.0) to make an instance of a class that has AS linkage compiled as swc by Flash Pro,  it fails on TypeError: Error #2022: Class DS0$ must inherit from DisplayObject to link to a symbol at flash.display::Sprite