Get Date +time from Oracle

hi ,
i saw that i can take date and time in seperate from the ResultSet .
how can i take the Time part as well from the date in the DB .
is there a way to create a new Date with the Time from the DB concatinated to it ?
doing as follows is apparently wrong ...
Date taskStartDate = rs.getDate("start_assign");
               Time taskStartTime = rs.getTime("start_assign");
               long tt= taskStartTime.getTime();
               Date taskStartDate = new Date(taskStartDatetmp.getTime()+tt);please advise .

You could convertjava.sql.Date sqlDate = resultSet.getDate("foo");
java.util.Date javaDate = new
java.util.Date(sqlDate.getTime());
This only works if the driver is ignorant enough to pass through millisecond values containing hours/minutes/seconds to the sql.Date, thus violating the contract of sql.Date.

Similar Messages

  • Get date-time from .lvm

    With Labview I've created a .lvm file with 6 colums of data. The .lvm also contains a x value (+1 for each row) so i'm saving 1 row of data every second.
    If I plot the data in Diadem the X-axis shows up as relative time, but I want to see the absolute time (date+time). All the information is to do this is present in the header of the .lvm, but I cant find the setting to do this!
    Thank in advance!

    Hi Inspectation,
    OK, I got your *.LVM file, and all is clear.  The problem in this case is that DIAdem 2010 and prior versions are hiding the absolute date/time property of the waveform from you in an attempt not to confuse you.  But since that's exacty what you want to see, this approach ends up being very confusing indeed, even though it works great for most of our customers.
    The good news is that the LVM DataPlugin is parsing the absolute date/time property for each channel, and that property is being loaded (invisibly) into the Data Portal, so you can run a VBScript to fish out that information and create a new DateTime channel to plot the data against on the X axis:
    OPTION EXPLICIT
    Dim GroupIdx, ChanIdx
    GroupIdx = GroupDefaultGet
    IF GroupChnCount(GroupIdx) > 0 THEN
    ChanIdx = CNoXGet(GroupIdx, 1)
    Call WfmToDateWfm(ChanIdx, "DateTime")
    Call ChnRenumber
    END IF
    Function WfmToDateWfm(Channel, DateTimeChanName)
    Dim ChnStartTime, OffStartTime, ChnDeltaTime, RelStartTime, RelStopTime, DateTimeChannel
    IF ChnPropValGet(Channel, "waveform") <> "Yes" THEN Exit Function
    ChnStartTime = CDbl(CDate(ChnPropValGet(Channel, "wf_start_time")))
    OffStartTime = ChnPropValGet(Channel, "wf_start_offset")
    ChnDeltaTime = ChnPropValGet(Channel, "wf_increment")
    RelStartTime = 24*3600*(Trunc(ChnStartTime) + 693958 + Abs(Frac(ChnStartTime))) + OffStartTime
    RelStopTime = RelStartTime + ChnDeltaTime*(ChnLength(Channel) - 1)
    IF DateTimeChanName = "" THEN DateTimeChanName = ChnName(Channel) & " DateTime"
    Call GroupDefaultSet(ChnGroup(Channel))
    DateTimeChannel = ChnLinGen("/" & DateTimeChanName, RelStartTime, RelStopTime, ChnLength(Channel))
    ChnFormat(DateTimeChannel) = "Time"
    Call ChnMove(DateTimeChannel, ChnGroup(Channel), ChnIndex(Channel))
    WfmToDateWfm = DateTimeChannel
    End Function ' WfmToDateWfm()
    Brad Turpin
    DIAdem Product Support Engineer
    National Instruments

  • How to get data back from an action ?

    Hello,
    Would it be possible to get data back from an action (out of the question EO_MESSAGE & ET_FAILED_KEY )?
    For example we got an order with order positions and we need a "function" to e.g. count all positions. Because of Performance the function should not be processed each time the order is changed, read or a position is added. Instead the function should be processed only if it was called explicitly.
    Is it possible to create a kind of action which is actually counting all entries and export the number of them?
    How to mark a parameter in is_parameters as exporting?
    Is this just done by (naming-) convention?
    What is the preferred way to have “methods” with returning/exporting values?
    Regards,
    Lorenz

    Hello Lorenz,
    As you have already figured out , the Action API provides you with only the messages and failed keys if any.
    Post action execution , you can always execute a retrieve or retrive by association , to get the latest buffer snapshot , which of course would include the changes that you have made in your action.
    If you want to ensure that users have explict control on execution of your "fucntion", then of course , you should model it as an action on the BO.
    The parameter is_parameters is an IMPORTING parameter. You CANNOT use it to export anything back from the action. For importing ,  you can of course have any structure to use as the is_paramaters , which you model as the action parameter structure which modelling your BO action.
    From an external entity the only way to interact with a BO is by consuming the BO services and you are bound by the BOBF standard interfaces. Any and all data you require needs to be modelled as node attributes ( persistent or transient ) and fetched using the RETRIEVE, RETRIEVE_BY_ASSOCIATION or QUERY services.
    Regards,
    Indranil.

  • Problem with date format from Oracle DB

    Hi,
    I am facing a problem with date fields from Oracle DB sources. The date format of the field in DB table is 'Date base type is DATE and DDIC type is DATS'.
    I mapped the date fields to Date characters in BI. Now the data that comes to PSA is in weird format. It shows like -0.PR.09-A
    I have changing the field settings in DataSource  to internal and external and also i have tried mapping these date fields to text fields with out luck. All delivers the same format.
    I have also tried using conversion routines like, CONVERSION_EXIT_IDATE_INPUT to change format. It also delivers me the same old result.
    If anybody of you have any suggestions or if anybody have you experienced such probelms, Please share your experience with me.
    Thanks in advance.
    Regards
    Varada

    Thanks for all your reply. I can only the solutions creating view in database. I want some solution to be done in BI. I appreciate if some of you have idea in it.
    The issue again in detail
    I am facing an issue with date fields from oracle data. The data that is sent from Oracle is in the format is -0.AR.04-M. I am able to convert this date in BI with conversion routine in BI into format 04-MAR-0.
    The problem is,  I am getting data of length 10 (Output format) in the format -0.AR.04-M where the month is not in numericals. Since it is in text it is taking one character spacing more.
    I have tried in different ways to convert and increased the length in BI, the result is same. I am wondering if we can change the date format in database.
    I am in puzzle with the this date format. I have checked other Oracle DB connections data for date fields in BI, they get data in the format 20.081.031 which will allow to convert this in BI. Only from the system i am trying creating a problem.
    Regards
    Varada

  • How to get system time from cRIO?

    Hello,
    I have an NI cRIO-9076 chassis with an NI-9467 GPS module and an NI-9234 module.
    I've downloaded the FPGA Timekeeper application which synchronises the FPGA clock to the 1PPS GPS, this works well.  What I want to do is create a trigger that at a pre-defined HH:MMS the system will start to acquire and log data from the Accelerometers connected to the NI-9234 module.
    I have added the controls for the entry of the HH:MMS and calculated the time in seconds.  I would like to compare the system clock once it is locked to the entered timestamp and then trigger.
    As I only have a value that represents seconds in the day I need to calculate the offset from EPOCH to compare against the GPS time reference.  I have read that the NI system clock runs from 01/01/1904 instead of the EPOCH 01/01/1970.
    The question is how do I get the current system time so that I can compare it against the entered time?  I only need seconds in the day = (HH * 3600) + (MM * 60) + (SS)
    Thank you,
    Kind Regards,
    Simon

    You should use the Get Date/Time in Seconds VI which will return a timestamp. You can then format this timestamp using the Format Date/Time String to give you exactly the time format that you need. Then you can extract the numbers you need and do your math.
    www.movimed.com - Custom Imaging Solutions
    Attachments:
    Get Seconds in Day.vi ‏9 KB

  • Is 000001010000z a valid date time in Oracle?

    Hi,
    When working with Open LDAP connection from Oracle, I need to set and remove the value '000001010000z' for locking and unlocking the user account respectively. This is working fine. However, for some calculation, I need to convert this value as a date value which I couldn't do. Is this a valid date time in Oracle? If so how to convert it as a date value.
    Oracle version: 10g R2
    Thanks,
    Natarajan

    Thanks, Mithun for your answer. We have the same issue, as an user, we can lock an account using the special value, but unable to unlock using the same user. I have reported this to our LDAP administrator.
    Regarding my question using this special value as a date value in oracle, though it is a valid date in the LDAP system, we cannot convert this as a date value in Oracle.
    Natarajan

  • Getting data out of Oracle to SQL Server 2005

    Hello,
    I am new in Oracle and I have this question.
    I need to transfer lots of data frequently at day from a large Oracle DB to a SQL Server 2005 Database.
    Could you tell me what tools (including PL/SQL) ORACLE offers to reach this goal?
    *.Dat files are still a way to perform this job or other method more performance (quickly and efficiently) are available?
    Using MS SSIS is better ?
    Thank for your help

    I've done getting data out of Oracle to MS Access DB using heterogenous servicing.I hope that that would be the best way for your case too..
    Check this out.
    http://www.datadirect.com/developer/odbc/oracle_heterogeneous/index.ssp
    Regards,
    Bhagat

  • How to get Date Format from Local Object.

    Hi All,
    I am new to Web Channel.
    I need to know Date format From date of locale.
    suppose there is a date "01/25/2010" date in date field I want to get string "mm/dd/yyyy". Actually I have to pass date format to backend when I call RFC. 
    Is there any way to get Date format from "Locale" object. I should get date format for local object
    I get local object from "UserSessionData" object but how to get Date format from it.
    I am not looking for Date value. I am looking for current local date format ("mm/dd/yyyy or dd/mm/yyyy or mon/dd/yyyy) whatever local date format.  I could not find example which show how to get date format from "Locale" object.
    Any help will be appreciated with rewards.
    Regards.
    Web Channel

    Hi,
    You can get it from "User" or "Shop" business object.
    Try to get User or Shop Business Object as shown below.
    BusinessObjectManager bom = (BusinessObjectManager) userSessionData.getBOM(BusinessObjectManager.ISACORE_BOM);
    User user = bom.getUser();
    char decimalNotation = user.getDecimalPointFormat().getGroupingSeparator();
    If you are seeing "1,234.00" then above code will return "."
    I hope this information help you to resolve your issue.
    eCommerce Developer.

  • How to convert the date time from MM-DD-YYYThh:mm:ss to YYYY-MM-DDThh:mm:ss format

    Hi All,
    I have a requirement in my project like to convert the date time from one format to another.my situation is like to convert the date time from MM-DD-YYYThh:mm:ss to YYYY-MM-DDThh:mm:ss format. I am using the soa suite 11.1.1.6.
    Can any one suggest me how to convert in the BPEL transformation.
    Thanks,
    Sanju.

    Hi Sanju,
    Store the date to be converted into a variable viz. dateVar. Now, process an expression in assign as: xp20:format-dateTime($dateVar,'[Y0001]-[M01]-[D01] [h]:[m01]:[s01]').
    Regards

  • Data transfer from oracle database(external database) to sap database

    Hi Abapers,
    I have a requirment like excel data upload from oracle database(external database) to SAP database .Plz any one can help me how to create a bdc program for this requarment.
    Advance thanks you.
    Jnana

    HI
    use function module 'ASLM_EXCEL_TO_INTERNAL_TABLE' TO UPLOAD DATA FROM EXCEL SHEET TO INTERNAL TABLE. FROM THERE U CAN SAVE IT TO DATABASE USING BDC FUNCTION MODULES.

  • DATA EXTRACTION FROM ORACLE & SYBASE

    Hello members...
    Good day. This is my first posting in this site. I am new to Oracle and have a question regarding Data extraction from Oracle and Sybase.
    My project has two applications one having Oracle as the database and the other has Sybase as the database. On the proposed production schedule, there would be a interface data update from the Oracle database to the Sybase database.
    My aim is to check if the data update is in sync after the update. We plan to extract the data from the two databases (Oracle and Sybase) and compare in a Third Party tool. We have the tool to compare. Can any of you suggest a nice data extraction tool. I have to set this data extraction as a batch in the nightly batch schedule.
    Thanks in advance,
    Regards,
    Krishna Kumar...

    Sybase provides the best data extraction utility called BCP. You can load and extract data. It is very user friendly. From your unix prompt if you type in BCP ? you will all the switches and
    help messages you need to use. It is so simple.
    Oracle dosn't have such a utility to extract data from table.
    You need to write a Stored procedure and use UTF_FILE package to
    extract data from table and write into a file.

  • How to get a time from a NTP server in ActionScript 3 ?

    Dear All,
    I need your advice, how to get the time from NTP Server , I tried to do this, but I don't.
    Thanks
    Omar Mahmoud

    you must use a server-side language supported by your server.  php is a commonly supported language on most servers.
    php tutorials can be found via google or any other search engine.

  • Convert Data type from Oracle Data time string to SQL Date time data type

    I have a time stamp column pulled from oracle into a SQL server db table varchar datatype column.
    Now i want to change that column to date time.
    Following is the data present in the table:
    01-APR-11 02.15.00.026000 AM -08:00
    01-APR-11 04.15.00.399000 AM -08:00
    01-APR-11 06.15.00.039000 AM -08:00
    I want to convert this data into sql server datetime data type.
    Please advice.
    Thanks,
    Sam.
    I am unable to find the solution in other sites which is why I have posted it in Oracle forum for seeking solution.
    Thanks in Advance.
    Sam.

    Sam,
    How are you actually loading the data into SQL*Server - are you using something like an Oracle gateway, BCP or another Microsoft utility of some sort ?
    If you are using an Oracle problem then we may be able to help but if using a Microsoft utility then you should really follow up with Microsoft to know what format the data should be in to use a Microsoft utility.
    Regards,
    Mike

  • Importing Date fields from Oracle always defaults to DT_DBDATETIME, and won't accept chages

    Hi
    I am trying to import date fields in an Oracle database in to SQL Server 2012, using SSIS. The package is using DT_DBTIMESTAMP type in the Data Flow, but this has the same range as SQL Server datetime, and it bombs out all the time.
    I have tried to change the type used to DT_DBDATE, but no matter what I do the data type on the input columns is readonly and will not change.
    Any help would be much appreciated
    Andy
    CRM 4, SQL Server and .Net developer using C#

    Hi Andy,
    From the Mapping of Integration Services Data Types to Database Data Types section of the document, we can get the detailed information about mapping the Oracle data types to Integration Services data types. To change the data type from DT_DBTIMESTAMP to
    DT_DBDATE, we can use the following two methods:
    Method 1:
    Right click on the Source component and click “Show Advanced Editor”.
    Switch to the “Input and Output Properties” tab, expand the XX Source Output node, and expand the Output Columns node.
    Click the target column, and change the DataType property to DT_DBDATE.
    Method 2:
    Add a Data Conversion component to the Data Flow Task
    Double click the Data Conversion component to open the Data Conversion Transformation Editor
    Select the target input column, and change the Data Type to database date [DT_DBDATE].
    If I have anything misunderstood, please feel free to let me know.
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • Getting data transfered from old HD to new ones, leaving 2 slots filled . .

    Hello,
    *(Below is a thread I started in another forum, but, didn't get my final questions answered (see at bottom of this post in BOLD), and am hoping for further help and suggestions. I know there is a lot to read here, but, I think this information will help other novices, such as myself. Thanks!)*
    I have 2 new HDs (each 1T) uninstalled, and I have my old HD (160 gigs) currently residing in one of the two slots in my G5. Any ideas on the best way/process to get the data transfered from the old HD to the new ones, leaving my two slots filled with the 2 new drives AND my data from the old HD transfered and intact, with a RAID0 setup?
    OR, are there any other suggestions on a good setup with the 2 new HDs??
    I'm open to suggestions.
    I always back-up on external HDs, so, is their a need for me to worry about setting up a RAID0??
    I'm doing video processing for DVD release.
    Should I just max out the 2x1T gig HDs and not worry about a HD failure??
    All Suggestions welcomed!!
    Thanks, Jack
    *FROM THE CUTTERMAN:*
    You are limited with only 2 drive slots. In this scenario what usually works best is a small fast drive (eg Velocirapter or SSD) for OSX/Applications and a large drive for video files. It is not advisable to have the operating system running from a striped array.
    Since you already have the drives, here is what you can do.
    Install one new drive and format the partition you wish to use for OSX. You may not want to use the whole drive for OSX, so make 2 partitions. Be sure that it is GPT-formatted so it can boot.
    Use CarbonCopy Cloner to copy your current OSX partition to the new one.
    Set the startup disk as the new partition.
    Remove the old drive and replace it with the second new one.
    Reboot, and partition/format new drive.
    *Hey Cutterman,*
    Thanks for the advice. That sounds like a good set-up. I'll have to research the process of doing what you've advised, but, should work out ok:
    A. Install one new drive and format the partition you wish to use for OSX. You may not want to use the whole drive for OSX, so make 2 partitions:
    1. Partitions are done under Disc Utilities correct? Never done it before; will take a look.
    B. Be sure that it is GPT-formatted so it can boot.
    2. GPT is also done under Disc Utilities, correct? Here I start to get a bit confused, as I've formatted Extended Journal, SO, the partition with the OSX & Applications is formatted GPT, and the rest of the HD is formatted as Extended Journal?
    C. Use CarbonCopy Cloner to copy your current OSX partition to the new one.
    3. So, I partition the first new HD and use Carbon Copy Cloner (also under Disc Utilities) to copy the OSX & Applications from my original HD to the first new HD, correct?
    D. Set the startup disk as the new partition.
    4. This will be an option when I setup the partition???
    E. Remove the old drive and replace it with the second new one.
    F. Reboot, and partition/format new drive.
    5. QUESTION: So, you recommend not striping the HDs: If I do a RAID 1, which sets up a mirror of the HDs, and since the first new HD is partitioned with the OSX & Applications, AND is set up as the Startup Disk, then the second new HD will also mirror that?? Another QUESTION: Even if the second new HD does not mirror the OSX & Applications, the second HD will only mirror the space/partition not utilized by the OSX & Applications partition, correct?
    Thanks for your help!!
    Jack
    *FROM THE CUTTERMAN:*
    OK I will try to answer your questions. To begin, if you want to mirror the 2 drives then you will need to boot from the SL install DVD or an external (USB/firewire) drive to set it up. IMO for your purposes it is too much hassle and a waste of HD space.
    1) Yes partitions are created in Disk Utility
    2) Yes, you choose a volume Scheme (ie number of partitions) and size them by dragging the separator bar. Then select the planned boot partition and click Options..., then choose GPT. I think it is usually the default but check and make sure. Extended journaled is the usual format.
    3) You need to download Carbon Copy. It is a free tool that will copy the entire image of your current system partition to the new one and make it bootable. Consider making a donation as it is a very useful and frequently updated utility. It is fairly intuitive to use. You can also use the restore feature in Disk Utility but I have had more experience with Carbon Copy.
    4) Once the copy process is finished the new boot partition will show up under the startup disk selections (this tool is in System Preferences).
    *FROM 666Sheep:*
    If may i correct one thing: OP, don't choose GPT (GUID Partition Table). You got PPC Mac (G5), so valid partition type for you is Apple Partition Map (APM).
    GPT is for Intel Macs and you will not able to boot from this kind of partition.
    *FROM THE CUTTERMAN:*
    Thanks for the correction- my bad. No familiarity with non-Intel Macs.
    G5 PowerMac, 2.5 GHz Dual, Dec. 2004, 6.5 GB RAM, 149 GB HD
    *Hi All,*
    *Since this process will come to a head on Tuesday/Wednesday, and I hope to be successful in transferring Old HD data to new HD/s.*
    *A: I'm still a little foggy here, as I thought I'd set up the 2 new T-gig HDs so that if one of them failed, I'd still have the data backed up on the other HD; more ideas concerning this would be reassuring:*
    *WHAT DOES "IMO" mean?*
    *(IMO for your purposes it is too much hassle and a waste of HD space.)*
    *As I understand the points made: After I partition the first new HD, and Carbon Copy data from old HD, I then install second new HD, and this will just act as an overflow from the first partitioned HD, correct? Because, if set up a Raid1/Mirror, the OSX partitioned portion of the first new HD will not copy to the second new HD, and that space on the second new HD will be wasted, correct?*
    *Also: I have to set up RAID1 (if I do not set up RAID0), correct?*
    *RAID 1*
    *From WIKI: RAID 1 mirrors the contents of the disks, making a form of 1:1 ratio real time mirroring. The contents of each disk in the array are identical to that of every other disk in the array. A RAID 1 array requires a minimum of two drives.*
    *Carbon Copy is a free tool that will copy the entire image of your current system partition to the new one and make it bootable.*
    *1. Is my old HD partitioned? Is that done automatically by MAC prior to PC purchase?*
    *2. Do I Carbon Copy the whole old HD or just parts? (eg. OSX, Photo Shop, After Effects, Various Files)*
    *3. I read that it is necessary to DEACTIVATE Photo Shop (I have CS3) prior to doing Carbon Copy. Is that correct? If so, does this also apply to other Adobe applications? Such as After Affects, Illustrator??*
    *Thanks to all for the help!!*
    *G5 PowerMac, 2.5 GHz Dual, Dec. 2004, 6.5 GB RAM, 149 GB HD*

    Confusing Information:
    A1: You also want to make sure the drive you are backing up to is formatted Mac HFS Extended (HFS+) if using Mac OS 8.1 or above.
    A2: On PowerPC Macs, your clone should be partitioned as Apple Partition Map.
    *Q? I thought the new HD (1T) should be formatted in Extended Journaled?*
    B: Also disable Spotlight (in 10.4 only) on your destination drive using Apple menu -> System Preferences -> Spotlight -> Privacy to add the destination drive to the pane.
    *Q? I'm using 10.4.11, so, I should follow these instructions?*
    C: If possible, boot into safe mode to perform the backup (holding the SHIFT key at startup). In addition, you can clone while logged into another administrative user that you don't use at all to avoid further complications of changes which may be happening to your regular user (though don't use Fast User Switching to get into that other user, since that other user is still active when fast user switching is used). Otherwise you are going to be running a backup on a live system which could have changes happening while you are attempting to backup. These may yield an imperfect clone, with uncertain success at recovery. It may be possible that your clone will have its own hardware issues, so make at least two copies.
    *Q? ?????????????*
    *I GOT THE ABOVE INFO. FROM THE FOLLOWING SITE:*
    Making a clone/mirror/duplicate backup
    http://www.macmaps.com/backup.html#SHORTANDEASY
    *ALSO, WHAT DO YOU THINK ABOUT THE ADVICE ON THIS PAGE:*
    http://www.levoltz.com/2010/04/21/how-to-transfer-data-to-your-new-hard-drive/

Maybe you are looking for

  • Mac/windows and dial-up

    I live out in the sticks and am unable to get any type of high speed internet. I have two telephone lines, one is connected to my iBook and the other is connected to my windows machine. I would like to know if I can use the dial-up connection on my w

  • How to reinstall safari browser in my emac power G4 running classic?

    how to fix my start-up not open classic and how to reinstall safari browser?

  • How to recover my Standby databse

    Hi every one, I need a suggestion in recovering a standby database which is not in sync with primary for last 2 months. due to server issues we brought down our standby down and made my primary to no archive log mode ( disabled archive log mode). Now

  • DATE or TIME variables

    I want to be able to create a registry entry that contains the current date. Is there an environment variable that I can use? I see that I can get the individual Month, Day and Year entries, but there must be one for the current date. And while we're

  • Doc of new features release 2

    Hi, I need a document of the new features collaboration suite release 2.