Adding the Time to the current Date

Hi ,
I have a column where I have time stamp with date and time(8-May-10 10:20:55 Am) from that i will get only time(10:20:55 Am)[query for this mentioned below] Now i need to append the time to current date and insert into a Timestamps column only .
so my result should be 17-May-11 10:20:55 Am(Assuming current Date is 17-May-11) .
can any one please help because i am bugged up.
I tried search it by i found a way in sql server by using DataAdd and DataDiff .Its very urgent requirement for me.
Thanks in Advance
Regards
Nikhil

Is that really a timestamp datatype or is it a DATE datatype?
If it's a DATE datatype then something as simple as...
SQL> ed
Wrote file afiedt.buf
  1  WITH t AS (SELECT to_date('8-May-10 10:20:55 Am','dd-mon-yy  hh:mi:ss AM') timestmp FROM DUAL)
  2  --
  3  SELECT timestmp,
  4         timestmp+(trunc(sysdate)-trunc(timestmp))
  5* FROM t
SQL> /
TIMESTMP             TIMESTMP+(TRUNC(SYSD
08-MAY-2010 10:20:55 18-MAY-2011 10:20:55
SQL>I personally would avoid using to_date(to_char.... as that involves too much datatype conversion. Oracle is perfectly good at doing date mathematics directly on DATE datatypes.

Similar Messages

  • Timer works if I set the time before the current one

    Hi,
    I've got a block that is part of an actionListener that has 4 buttons, anyway I want the timer to execute something exactly at the time I set it.....but in the code that I have it also executes if i set the time before the current time
    Here's the segmant:
    private class ButtonResponder implements ActionListener
              public void actionPerformed(ActionEvent event) 
                    if (event.getSource() == exitButton)
                                  System.exit(0);
                   if(event.getSource() == setButton)
                        int hour = Integer.parseInt(hours[hourComboBox.getSelectedIndex()]);
                        int min = Integer.parseInt(minutes[minuteComboBox.getSelectedIndex()]);
                        Calendar calendar = Calendar.getInstance();
                        calendar.set(Calendar.HOUR_OF_DAY, hour);
                        calendar.set(Calendar.MINUTE, min);
                        calendar.set(Calendar.SECOND, 0);
                        Date time = calendar.getTime();
                    timer = new java.util.Timer();
                        timer.schedule(new TimerTask()
                             public void run()
                                  JOptionPane.showMessageDialog(null, "it is time");
                        , time, 5*1000);
                   if (event.getSource() == cancelButton)
                        timer.cancel();
              }So if I put zeros in hours and minutes it will execute immediately....how can I make execute at the exact time (so that if the time now is 2:00 and I set it to 1:00 it only executes the next day??
    Message was edited by:
    Octavian

    Bump the day if the time is less than current time.
    Kaj

  • How can I save my data and the date,the time into the same file when I run this VI at different times?

    I use a translation stage for the experiment.For each user in the lab the stage position (to start an experiment) is different.I defined one end of the stage as zero. I want to save the position , date and time of the stage with respect to zero.I want all these in one file, nd everytime I run it it should save to the same file, like this:
    2/12/03 16:04 13567
    2/13/03 10:15 35678
    So I will track the position from day to day.If naybody helps, I appreciate it.Thanks.

    evolution wrote in message news:<[email protected]>...
    > How can I save my data and the date,the time into the same file when
    > I run this VI at different times?
    >
    > I use a translation stage for the experiment.For each user in the lab
    > the stage position (to start an experiment) is different.I defined one
    > end of the stage as zero. I want to save the position , date and time
    > of the stage with respect to zero.I want all these in one file, nd
    > everytime I run it it should save to the same file, like this:
    > 2/12/03 16:04 13567
    > 2/13/03 10:15 35678
    >
    > So I will track the position from day to day.If naybody helps, I
    > appreciate it.Thanks.
    Hi,
    I know the function "write to spreadsheet file.vi"
    can append the data
    to file. You can use the "concatenate strings" to display the date,
    time as well as data... Hope this help.
    Regards,
    celery

  • I have a Time Capsule with 2tb of storage, and an I-Mac with 500Gb. (which is at capacity) Can I use the Time Capsule to store data in addition to backing up the hard drive?

    I have a Time Capsule with 2tb of storage, and an I-Mac with 500Gb. (which is at capacity) Can I use the Time Capsule to store data from my hard drive that I want to access later in addition to backing up the hard drive?

    Can I use the Time Capsule to store data from my hard drive that I want to access later in addition to backing up the hard drive?
    Yes, but if you move the "original" data on your iMac to the Time Capsule....then the "original" data is now on the Time Capsule disk. 
    When...not if...the Time Capsule disk has a problem, you have no backups for this data.
    Perhaps a much safer plan might be to add an external hard drive attached directly to your iMac. Then, move the data to that drive from the iMac.
    Now, Time Machine will back up both your iMac and the external hard drive so you have "originals" on one drive and backups on another. Would that plan work for you?

  • At the time of charging current generate in my iPhone what I do?

    At the time of charging current generate in my apple phone what I do ?

    Ummmm, what?
    Try posting in your native language.

  • Wmi script to find out the time when the user was added to local administration group

    Hi Friends,
    i need a script/query based on wmi/wql that find out the time when the user was added to local administration group on this computer
    Regards
    Tanoj
    OSLM ENGINEER - SCCM 2007 & 2012

    WMI does not keep security information.
    Unless you have enabled auditing, this information is not retained in any way.
    If auditing is enabled, you can write a powershell script to look for the specific event in the eventlog. More specifically, you should look for all security events with id 4732 containing the group.
    this one command does the trick
    get-eventlog -logname security -instanceid 4732 -message *administrators*
    https://technet.microsoft.com/en-us/library/dd772663(v=ws.10).aspx
    MCP/MCSA/MCTS/MCITP

  • How to calculate the Time difference between 2 dates

    HI All,
    I am using HR_hk_diff_btw_2_dates to calculate the employee service dates.
    For that i  am inputing his hire date and Term dates and Output format as '05' i am getting output perfectly....
    But problem is  whe i am inputting the employee hire date is Dec 1 2007 and Term date is
    March 31 2009 It is coming as 1 year 3 months  31 days instead of 1 year 4 months directly .......How could we make it make last date also working day and get the O/p as 1 year 4 months ?Please Advice..
    Regard
    sas

    1. FM for difference betwwen two times:SCOV_TIME_DIFF
    Import parameters               Value
    IM_DATE1                        2008-01-01
    IM_DATE2                        2008-01-01
    IM_TIME1                        10:00:00
    IM_TIME2                        11:30:00
    Export parameters               Value
    EX_DAYS                         0
    EX_TIME                         01:30:00
    2. SD_CALC_DURATION_FROM_DATETIME : Finds the difference between two date/time and report the difference in hours
    L_MC_TIME_DIFFERENCE : Finds the time difference between two date/time

  • How to get only the date without the time in the footer of a printout?

    Is there a way to get only the date without the time in the footer of a printout?

    As far as I can tell, there's no built-in option to get the date printed without the time. It's hardcoded in a C++ file.
    As a workaround, you can enter custom text for the footer, but it would need to be updated every time the date changed. I can think of a couple ways to automate that:
    * An add-on (but I'm not aware of any add-on for this)
    * External process to push a new date into prefs.js, a settings file that stores your header/footer preferences, among others (but Firefox should be closed when you update this file, and it will be read when you restart)
    Not easy enough, I know.

  • Can i buy a smaller macbook air (64gb) but use the time capsule for additional data ?

    can i buy a smaller macbook air (64gb) but use the time capsule for additional data ?

    If you plan to store important "original" or "master" files and documents on the Time Capsule, then you might want to think about a way to back up those files to another hard drive.
    Why? If the Time Capsule has a problem...and you have no backups....you lose everything.

  • The time on the weather widget on my home screen does not match the phone time.  Initially it did, but one day it started being 1 hour earlier than the phone time.  I went into Settings/Date

    The time on the weather widget on my home screen does not match the phone time.  Initially it did, but one day it started being 1 hour earlier than the phone time.  I went into Settings/Date & Time & now the time on the weather widget is correct, but the phone time is 1 hour earlier.  Any suggestions??

    Settings | Date and Time  then select Automatic date & time, and Automatic time zone. In this way, the carrier time will populate the phone. If it's still going 1hour off, then I'd call VZW and inquire if they have a tower issue, specially if it happens in one particular place.

  • What do the dates and the times on the data sheet mean?

    what does the dates and the times on the data sheet mean?

        marcus19541
    We definitely want to make sure that your data usage reporting is clear so you can monitor everything clearly! The timestamps that appear when viewing your data usage details on My Verizon may not be the exact time that data was completely used. The corresponding usage and time reflect usage from between the last report and the one you're reviewing.
    For example, say there was a report for 312MB at 2AM and the report right before that was for 100MB at 6PM. The 312MB were used between the 6PM report and the 2AM of it's own time stamp.
    Please let us know if you have any further questions about your data usage!
    RuthW_VZW
    Follow us on twitter @VZWSupport

  • I have no idea whether there is a causal relationship but since moving to Lion and iCloud, my iMac has become so slow that I wind up having to crash and restart most of the time.  This is true regardless of the app I am using at the time.  The specs of th

    I have no idea whether there is a causal relationship but since moving to Lion and iCloud, my iMac has become so unresponsive that I wind up having to crash and restart most of the time.  This is true regardless of the app I am using at the time.
    The specs of this iMac are:
    iMac 27 inch, late 2009 model with a 3.0 GHz Intel Core 2 Duo with 4 Gig 1067 Mhz DDR3, using OSX Lion 10.7.4 (11E53)
    I have Mackeeper installed and according to the scans I have run, everything is fine. No virus, no junk files . . . no problems at all . . .
    Except that for all practical purposes, my computer isn't working. 
    I am nearly totally deaf and live in an isolated, rural area of NW Missouri and this computer is what I mainly rely on to contact friends, relatives and business associtates!
    Any and all suggestions will be greatly appreciated!

    First, back up all data immediately, as your boot drive may be failing.
    If you have more than ten or so files or folders on your Desktop, move them, temporarily at least, somewhere else in your home folder.
    If iCloud is enabled, disable it.
    Disconnect all wired peripherals except keyboard, mouse, and monitor, if applicable. Launch the usual set of applications you use when you notice the problem.
    Step 1
    Launch the Activity Monitor application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ If you’re running Mac OS X 10.7 or later, open LaunchPad. Click Utilities, then Activity Monitor in the page that opens.
    Select the CPU tab of the Activity Monitor window.
    Select All Processes from the menu in the toolbar, if not already selected.
    Click the heading of the % CPU column in the process table to sort the entries by CPU usage. You may have to click it twice to get the highest value at the top. What is it, and what is the process? Also post the values for % User, % System, and % Idle at the bottom of the window.
    Select the System Memory tab. What values are shown in the bottom part of the window for Page outs and Swap used?
    Step 2
    You must be logged in as an administrator to carry out this step.
    Launch the Console application in the same way as above. Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left.
    Post the 50 or so most recent messages in the log — the text, please, not a screenshot.
    Important: Some personal information, such as your name, may appear in the log. Edit it out before posting.

  • How to create index not unique at the time of the CREATE TABLE

    Hi,
    I am trying to find out how in Oracle create secondary indexes that can accept duplicated into the CREATE TABLE statement, without have to execute a CREATE INDEX separately.
    As far I can see the only syntax accepted by Oracle 9i to create more than one index at the time of the table creation is:
    CREATE TABLE test_tab (x INTEGER, y INTEGER, z INTEGER PRIMARY KEY(x,y), UNIQUE(z))
    But, in my case I need to have the unicity only for the primary key, but not for the second index, that I would like to have not unique.
    How to do that inside of the CREATE TABLE statement?
    Any help?
    Thanks a lot in advance.

    To create an index automatically (not constraint related) , you will need to have an 'event' trigger on the schema that will (IE: detecting a table create/drop matching ARCHIVE_%) , generate the appropriate SQL required (create index sql) and pass THAT to a DBMS_JOB.
    Make sure you have job queue's enabled.
    This was the ONLY way that I could re-create a view automatically as new tables were created that matched a criteria IE ARCHIVE_JAN06, ARCHIVE_FEB06 etc.
    The application's "archiving" method created and was thus aware of these tables and permitted searching within 'archived' data, but 3rd party reporting applications needed to see a view encompassing all data, regardless of the tables involved. The view automatically created was a 'union_all' of all tables concerned.

  • After a recover database, how can I find the time of the last transaction?

    After doing a restore and recovery. Is there something in the data dictionary that I can query to find the time of the last applied transaction that took place during the recover process?
    restore database ;
    recover database ;
    For example, if I restored from a full backup on 8/3/2008 with archive redologs, I know my last restored transaction is from sometime on that day, but I'd like a way to know the hour:minute:second of the last transaction included in the backup and redologs that was applied to my restore. Is that possible?
    The recover database applies all available redo logs for that day, but I want to know if that includes transaction up to 6PM, or 11:50PM, etc?
    Thanks,
    Jason

    If you did only a "recover database" that would have been a Complete Recovery to the last transaction -- ie the point when the database was shutdown.
    For an Incomplete Recovery, you would have to note the Sequence#, SCN or Timestamp of the recovery point.

  • Why the time of the online redo logs doesn't change?

    Oracle 11.1.0.7 on windows 2008.I find the time of the online redo logs doesn't change since Jan 18 when I had restarted database,and the time of some datafiles doesn't change either.the database is always online and changes are wrriting to the files, I don't know how this happened?
    would anyone help me? thank you.

    ROCK wrote:
    I found some datafiles have the latest date,but the other not. They all have write/read operations on them.
    and the switching of the redo logs doesn't change the timestamps of the logfiles since Jan.18 when I had restarted the database. this situation does not appear on the early 8.1.7 database on windows 2000
    Does this situation normal?Hi,
    Why dont you post the output of the query you are using such as
    select group#, first_time, status from v$log;
    select name, last_time, status from v$datafile;
    select name, CHECKPOINT_TIME, status from v$datafile_header;Time stamp wont change for offline and may be for temp tablespace.
    Regards
    Anurag

  • How can I hide the time of the day in calendar events in OS 10.9?

    How can I hide the time of the day in calendar events in OS 10.9?

    Currently, the order in which the phone numbers appear (in a contact) is dependent on the sequence to which you enter them. There is no way to change that order other than re-entering them in the desired order.

Maybe you are looking for