To eliminate date and extract only time component

hi i am getting an input from a table which is of varchar2 type and the field has data like
8:00 am-8:00 pm
now i want to insert 8:00 am as start_time and 8:00 pm as end time in the columns start_time and end_time in another table.the 2 columns are of date type.
HOW do i remove the date and just insert time in these columns
because if i do
insert into..
to_date(substr(peak_time,1,7),'hh:mi am') ......
then along with time current date gets appended.

to be honest? If that was the requirement (eg. scheduling items to run between two times), I'd store it as numbers - probably as minutes. - eg. 8 hours = 8*60 minutes
Then I'd do something like:
select my_date + start_time_in_mins/1440 from my_table

Similar Messages

  • Running a mid 2009 iMac on 10.7.5, 3 gb memory, 320 gb hd.    Suddenly the computer stoped reading DVDs and the only time I can read a CD is if I restart.  Quite often when I insert a CD it gets stuck and I cannot get it out until I restart and it shows u

    Running a mid 2009 iMac on 10.7.5, 3 gb memory, 320 gb hd. 
    Suddenly the computer stoped reading DVDs and the only time I can read a CD is if I restart.  Quite often when I insert a CD it gets stuck and I cannot get it out until I restart and it shows up on the desktop where I can then eject it.
    I have checked and double checked the finder prefs and all looks normal showing a check mark on CDs,DVDs etc. (the ones I want to show up on the desktop)
    I have reset the PEAM, repaired permissions with both the disk utility on the computer and the disk utility when I start up in the Recovery Disk.  I did notice that sometimes the permission repeat the same correction several times before it moves on, and sometimes it doesn’t. I have Windows installed on a partition but I keep it unmounted until it is needed for my wife’s work.  The dock seems to be just fine and all the apps seems to run just fine.  When I insert a photo CD iPhoto does not open but when I insert a music CD iTunes does open. 
    Also, most every time I open iPhoto it takes a long time(sometimes as long as 2 minutes) for it to load.
    Sometimes my Mail (Mail 5.3) does not post new mail but most of the time it does. 
    Once and a while it seems like the computer slows way down but then it seems ok ten minutes later.
    All  of these ‘things’ seemed to have happen suddenly and I have not downloaded anything from the internet in some time.
    Of course the warranty and extended warranty are both no longer in effect having had this computer for more than three years.
    I am running Java and Adobe Player because some of the sites I go to a lot require both.

    I believe that insufficient RAM may be the source of some of your problems. If you have a RAM of somewhere 4 to 8GB, you will experience smoother computing. 3GB doesn't seem right, so you might want to learn more by going to this site:
    http://www.crucial.com/store/drammemory.aspx
    I don't know what know what's happening with your optical drive, but it seems you use your drive quite a bit. In that case, look into a lens cleaner for your machine. It's inexpensive, works quite well.
    I hope you'll post here with your results!

  • How to remove unnecessary data and print only the required data in JSP

    Hi all
    The following output is from TCP/IP connection of RFID Reader.
    Connected to: /192.168.0.3
    EVT:DCE DCEVERSION 3.2.0.0
    EVT:DCE READER IM5 RFID Reader Ver 3.29
    EVT:DCE READERINFO Basic Reader Interface Version Q
    EVT:DCE READERINFO FCC 915Mhz
    EVT:DCE READERINFO Copyright (C) 2002-2006 Intermec Technologies Corp.
    EVT:DCE FIXEDATTRIB CHKSUM=OFF
    EVT:DCE FIXEDATTRIB TTY=OFF
    EVT:DCE FIXEDATTRIB ECHO=OFF
    OK>
    EVT:TAG H02000031323334000151E62B 1 1
    EVT:TAG H02000031323334000151B775 1 1
    For my JSP case I have converted above output's program in javabean I want to print only tagID and other values in a table in my JSP page. Could anybody let me know how to ignore the unnecessary data and print only values after EVT:TAG in three columns and rows, besically rows are not fixed because it depends on reader how many tags it detects?
    Thanx
    kvijai

    Hi,
    Try this
    private function doFilter(item:Object):Boolean
         var searchString:String = myTextIp.text.toLowerCase();
         if (item.name.search(searchString) == 0)
         return true;
              else
         return false

  • Is there any way to turn off data and use only wi fi

    is there any way to turn off data and use only wi fi, going to a foreign country and do not want to use data but wi fi will be available. I want to be sure to use only wi fi

    Yes there is!
    Simply go into Settings, General, Mobile Data, Turn this off and make sure Data Roaming is also switched off! You can have wifi on and this will no charge your account for the data you use via Wi-Fi!

  • How to eliminate date and time in image logging in vision express

    I am using vision express to capture a set number of images with inline processing. I am opting to log the images to a specified folder. However, the file names of the images have the date and time appended by default. Is there a way to eliminate the date and time in the images' file name? Please help.
    Solved!
    Go to Solution.

    Hi
    It may help if you paste your code and file to better understand what is it that you want to remove from the file. If you have the vision development module, you can certainly use the File VIs available within the vision tools utilities palette in LabVIEW to manipulate the way you save your files.
     http://www.ni.com/pdf/manuals/371007a.pdf (Page14)
     There is a good example code you can refer to within the following forum link:
    http://forums.ni.com/t5/LabVIEW/Labview-IMAQ-VI-for-capturing-images-and-saving-with-incremental/td-... 
    Also if you have access to the Vision Builder for Automated Inspection software, this application offers you that option:
    http://digital.ni.com/public.nsf/allkb/AE578D1C036084C0C1256EB4005EE687?OpenDocument
    Luis S
    Application Engineer
    National Instruments

  • Af:inputDate that shows and picks only time

    Hello everyone.
    I'm using jdev 12.1.3
    In an af:inputDate component I have specified the type (in the converter) to be time.
    So, the user sees in the display only time.
    In the ui, next to the af:inputDate field there is always the date and time picker.
    Is it possible the picker to display only the time and not both date and time?
    I mean, since the user is interested only in time, what's the point of showing the date in the picker?
    Is there a declarative way to do this? (or it can be tackled through css only?)
    Thanks a lot
    ~apostolos

    Thanks a lot Timo.
    Actually I'm looking for something fast now (in terms of implementation) and see in the future the declarative comp way you suggested...
    apostolos

  • How can I sort pictures by date and than by time stamp ?

    The approx. 2.000 pictures was taken by two cameras.
    Both cameras intern date and time where adjusted before the for session.
    It seems that Aperture 3.3.1 can´t manage it, can it?
    In the browser there is only one common field for date and time.
    I shoot the picture with two Canon 5D Mark II and Mark-III in JPG and RAW mode.
    The file name only is totally confusing for sorting.
    Like IMG_0008, _MG_0022 for Mark-II
    and
    _L2A8410 for Mark-III.

    Hi,
    I am not sure, which sort order you want to achieve? If you sort by the date field, the images will be sorted chronologically, ascending or descending, according to date and time - isn't what what you want?
    Can it be that you have a time zone problem? Compare the dates on the images that should be sorted side by side.
    Unless you specify "Camera Time" and "Actual Time" on import, Aperture will assume that the camera time has been your current system time.
    Canon 5D Mark II and Mark-III
    And unfortunately, both your cameras are exactly the two cameras that I know, where the time zone correction in Aperture is buggy and does not have much effect. I cannot find the discussion again right now, but look for a thread by Frank Caggiano on time zone correction.
    Regards
    Léonie

  • Why does Oracle SQL query returning a date field without the time component

    Hi,
    I'm a novice SQL user & hv just installed Oracle SQL developer (Version 3.0.04, Build MAIN-04.34).
    I made the same SQL query using "Oracle SQL developer" & "TOAD for Oracle 9.0.1" but I got 2 different format on the same date field:
    On TOAD, I get the date field extracted as *04/26/2011 23:12:58*
    On Oracle, I get the date field extracted as *26/APR/11*
    Why is the Oracle result in a different format & missing the time component?
    Is there any option/preference that I need to set in Oracle SQL developer to get the full date/time format displayed?
    I've tried to set my the date format to DD/MON/RR HH12:MI:SSXFF AM under the preference -> database NLS but I still get the same format!
    Plse help!

    hokim wrote:
    Hi,
    I'm a novice SQL user & hv just installed Oracle SQL developer (Version 3.0.04, Build MAIN-04.34).
    I made the same SQL query using "Oracle SQL developer" & "TOAD for Oracle 9.0.1" but I got 2 different format on the same date field:
    On TOAD, I get the date field extracted as *04/26/2011 23:12:58*
    On Oracle, I get the date field extracted as *26/APR/11*
    Why is the Oracle result in a different format & missing the time component?
    Is there any option/preference that I need to set in Oracle SQL developer to get the full date/time format displayed?
    I've tried to set my the date format to DD/MON/RR HH12:MI:SSXFF AM under the preference -> database NLS but I still get the same format!
    Plse help!http://edstevensdba.wordpress.com/category/nls_date_format/

  • Does PSE13 download photos in the order they are taken on that date and show actual time when hovering over the photo as it did in PSE6?

    In my work, I need to be able to look at photos I took throughout the day at various locations and group them by the time I was there on that date to distinguish the different properties I am taking photos of.  In my previous version of PSE6, when the day's pictures were downloaded, they were downloaded to the computer in the order I took them, and if you hovered over the picture it would show the time the photo was taken.  I just need a program that will organize in that fashion.  I do not need a lot of editing options, more the organizational options.

    Hi,
    If you are happy with PSE 6, why not continue to use it?
    PSE 13 can display the images in date/time order like PSE 6 does. The time doesn't appear when you hover over a thumbnail but can be displayed below the thumbnail. The best thing is for you to download the trial version (select version 13 from the following link) and try it for 30 days to see if you like it.
    Download Photoshop Elements products | 13, 12, 11, 10
    If you use the trial, to see the date and time under each thumbnail you need to go to the View menu in the organizer and ensure that Details is checked.
    Brian

  • 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

  • Problem with SLQ Date and Daylight Saving Time

    Hi everybody!
    It seems, that when I have a date in the database, which falls on start of the daylight saving period, it is converted to the previous date.
    Example: '2001-10-13' will become '2001-10-12' after doing a date = rs.getDate() and then converting back using date.toString().
    This caused a lot of trouble because the date value is part of an unique key constraint!
    Currently I wrote a wrapper method, which obtains the date as string and converts this one into a date by setting the hours to 12:00.
    Does anybody know a straighter way to avoid the conversion?

    Because the default time zone is using day light saving time. To remove this feature, reset your default time zone at the very beginning of your program:
    TimeZone.setDefault( new SimpleTimeZone( TimeZone.getDefault().getRawOffset(), TimeZone.getDefault().getID() );

  • Writing dynamic data and extract it latter

    i want to write a waveform in a file so that in future i can see the saved waveform on the graph dynamically, i mean if i save the dynamic data for 3 hours can i get the data running on the graph for 3 hours in future please help........

    Saving data at 20kHz for three hours is close to 2GBytes (assuming saving DBL data type), so you probably want to use a binary file format. I would recommend using TDMS.  Each time you create a new data set, write it to a new channel with a unique name.  I would recommend using a timestamp as the name, so you can easily figure out when your data was taken and it is easy to generate the channel name.  Make sure you use enough time resolution in your timestamp name to make them unique.  Alternately, you can use an indexed channel name (e.g. Data0001, Data 0002, etc.).  If you do this, save the timestamp as metadata with each magnitude.  This may make it easier to fetch.
    Reading the data later is fairly easy.  Fetch the data you want using the channel name or timestamp, depending on how you stored it.  TDMS does support multiple access at the same time, so you can read and write "at the same time."
    If your data sets are large (megabyte or larger) you may want to take a look at Managing Large Data Sets in LabVIEW.
    Let us know if you need more information.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • My sound is gone and the only time it comes is when i use a speaker

    my sound does not work the keys do not work too

    Go step by step and test.
    1. System Preference > Sound > Output > Internal Speakers
        Highlight  Internal Speakers.
        Make sure that Mute is not enabled.
    2.Plug in and  remove the headphone.
        If you see red light in the headphone port, plug the headphone
        in and out of the port 5 or 6 times to flip the microswitch inside.
        Sound output may be stuck in the digital mode.
        Try this even if you don’t see the red light.
    3. Reset PRAM.  http://support.apple.com/kb/PH14222
    4. Reset SMC.     http://support.apple.com/kb/HT3964
        Choose the method for:    "Resetting SMC on portables with a battery you should not remove on your own".
    5. Applications > Utilities > Audio MIDI Setup
        Audio Devices window
        Side Bar
        Click the Built-in Output.
         Make sure that no box is checked under “Mute”.

  • Address book loses all data and DUPLICATES numerous times

    Address book is broke. After installing 10.4.3 I lost ALL my 600 addresses, they just disappeared. I restored from backup database no problem. BUT, now my address book is all confused!!!! I has duplicated the addresses. I resest and zeroed .mac, I reset my iPod addresses and also my bluetooth phone. However, THREE times I have opened address book to find my addresses have been duplicated again! I "merge" and look for duplicate adresses but that does not catch them all. I hope Apple releases new design. Address book is not working very well right now on my 12 inch powerbook G4 with 700meg RAM. Maybe someone can review with me how I should wipe out all previous info on Address book and restore a clean database of addresses. I have gone in an looked in library/Application Support/Address Book and replaced that folder already.

    Hello Mark, welcome to the discussions. I think the confusion lies with the syncing software rather than AB itself. Try turning of syncing, then delete and restore your AB on the powerbook. Observe it for a couple of days without doing any syncing and I think you will find it is stable.
    AK

  • Date and Time formats change in transfer rules

    Hello Experts,
    Could someone please help me to fix the following issue with DATE AND TIME format.
    I have two info objects zdate with data type DATS (length 8) and ztime with data types TIMS (length 6).
    The data in the data source (alalertdb table) is in the format of date dd.mm.yyyy and time in hh:mm:ss.
    Now when i am trying to extract the data, the load is failing because the system is taking dd.mm.yyyy length as 10 and hh:mm:ss length as 8. My infoobject
    only alows 8 for date and 6 for time.
    Do I need to write any routines in the transfer rules? If yes please share the code.
    All the inputs are much appreciated.
    Thanks in advance.
    Regards,
    Harish

    Hello ALL,
    Thanks for your inputs.
    Adios, I will try your routine if I am not tru with the formula. Thank you very much for your reply.
    Bjorn, Your formula sounds quite simple. can you please eloberate the information.
    When I used the formula for the date field its giving me an error with message FORMULA ELEMENT IS NOT ALLOWED HERE.
    Formula I used is:
    LEFT( 2, < /BIC/ZOOH_DATE> ) & SUBSTRING( < /BIC/ZOOH_DATE>, 3, 2 ) & RIGHT( 4, < /BIC/ZOOH_DATE> )
    can you also please let me know what results the formula brings.
    Thanks and Regards,
    Harish Mulaka

Maybe you are looking for