DateTime as OracleParameter? How ?

float [] m_upVal = new float [3];
DateTime [] m_upT = new DateTime[3];
OracleCommand upcom = new OracleCommand (upcstr,upcon);
               upcom.CommandText = "update current_values set value = :val, time_stamp = to_date(:t_st, 'dd:mm:yyyy hh24:mi:ss')
upcom.ArrayBindCount = 3;
OracleParameter up_val = new OracleParameter ("val", OracleDbType.Long , ParameterDirection.Input);
up_val.Value = m_upVal;
upcom.Parameters.Add (up_val);
OracleParameter up_ts = new OracleParameter ("t_st", OracleDbType.Date, ParameterDirection.Input);
up_ts.Value = m_upT ;
upcom.Parameters.Add (up_ts);
upcom.ExecuteNonQuery();
Result: Oracle.DataAccess.Client.OracleException ORA-00932
What is wrong ?

Yes, it seems that i had to make the change after creation, not while creating the preset. thank you.
tell application "Adobe InDesign CC"
     set newPreset to make new PDF export preset with properties ¬
          {name:"preset name", standards compliance:none, acrobat compatibility:acrobat 7}
     tell newPreset to set PDF color space to unchanged color space
end tell

Similar Messages

  • How to store date in database , taking cre of timezone

    Hello java users
    I have a user interface in which a user can pick a date, time and timezone.
    Implemented simply.
    start Date as a textbox: format - MM/dd/yyyy
    start time as a textbox : format - HH/mm/ss
    start timezone as a drop down. And currently there is only 3 values here: PST,EST,CST. As this is what we support.
    I am using MSSQL and my date field column ( startdate ) is of type datetime.
    Now how will I pass the correct value to the database.
    Some more details.
    I have a bean i which I am able to retrieve all the values.
    public class MyBean implements serializable{
    private Date startDate;
    private Date startTime;
    private String timezone; // this will store the timezone id selected by the user.
    //getters and setters
    Now, how will I combine all the values selected by the user and set in the bean and save it in the database.
    I am sure there are a lot of times someone has tried to do this. But I am having a hard time finding this info in a collective manner.
    Any help would be usefull
    Thanks
    Aayush

    Its does help.
    And yes it is requirement to get the date and time and the timezone info from the user through a UI.
    And date is in format : MM/dd/yyyy
    time is in format : HH:mm:ss
    and there are 3 timezones : PST,EST,CST (And yes these are valid timezone ids).
    I guess, the other way to put this is that - The user input is the way to get the StartTime data.
    And ya it makes sense to have separate fields in the database to store date and timezone.
    I am fairly new on this date part and its confusing me a little.
    So I will go into a little more details.
    As u suggested that it would be a good idea to have 3 separate fields for doing this.
    you mean to have 3 fields in the database with columns like
    1. startDate - datetime // to store the start date ( MM/dd/yyyy)
    2. startTime - datetime // to store the start time ( HH:mm:ss). Is it possible to store only time in the database or are you suggesting to combine date and time in one database field.
    3. startTimeZone - varchar // to store time zone.
    So how do I achieve this.
    lets say I get these values;
    String startDate = "09/06/2008";
    String startTime = "11:10:12";
    String startTimeZone = EST;
    now how will I store it in the database.
    consider I have a java bean
    public class StartTimeBean{
    private Date startDate ;
    private Date startTime ;
    private String startTimeZone;
    also I am using a OR mapping tool ( ibatis )
    And I have my insert statement mapped to the bean StartTime.
    Essentially what I am looking for a say method say , createTime(StartTimeBean startTimeBean )
    so how will I store the info in the database

  • Convert displayed datetime in Flex app to database's

    I currently use Flex web services to request data from an sql
    server database (via a .net app) and bind the result set .net
    datatable to a flex datagrid. The datagrid has a datetime column
    that displays the local time at which the client created the record
    instead of the sql server datetime value. How can I change my
    datagrid records to show the database's datetime? Here's an
    articles related to this issue... but wasn't able to get it to work
    in my context:
    http://blog.shrefler.net/?p=13.
    Any help would be appreciated!

    "justneed2know" <[email protected]> wrote in
    message
    news:g980h7$m5f$[email protected]..
    >I currently use Flex web services to request data from an
    sql server
    >database
    > (via a .net app) and bind the result set .net datatable
    to a flex
    > datagrid.
    > The datagrid has a datetime column that displays the
    local time at which
    > the
    > client created the record instead of the sql server
    datetime value. How
    > can I
    > change my datagrid records to show the database's
    datetime? Here's an
    > articles
    > related to this issue... but wasn't able to get it to
    work in my context:
    >
    http://blog.shrefler.net/?p=13.
    >
    > Any help would be appreciated!
    Why not just send the request to create the record to the
    server _before_
    you do anything with it in Flex, then bring it back and
    display it in Flex?

  • BCS Datetime format to date only format in external list

    Hi ,
    Version: SharePoint Online 365
    I am having Date Field in DB . While i am retrieving in BCS Its showing as Datetime Format.
    How can trim Time Value. I need to display in Date Format only .
    How can i change? Please give me suggestions!!!
    Regards
    Vidhya

    Hi Vidhya,
    Try to format the date in the BCS External content Type, Please go through following link for further reference:
    http://blogs.msdn.com/b/bcs/archive/2010/02/11/working-with-complex-data-types-in-business-connectivity-services.aspx
    http://msdn.microsoft.com/en-us/library/gg271157.aspx
    Please don't forget to 'mark answer/propose answer' or 'vote as helpful' as appropriate.

  • Datetime of Records UTC vs. Local Time

    Hi, I notice that the Integrator automatically converts the datetime of records to UTC upon insertion. In Studio however, we want the analysis / records to reflect our local time instead. The Endeca Server Data Loading Guide http://docs.oracle.com/cd/E37502_01/server.751/es_data_loading/toc.htm#dateTime%20property mentions about the possibility of updating a record with two datetime properties. How is this achieved using Integrator? My records seem to be converted automatically into UTC even when I append the timezone. Thanks!

    I'm afraid this explanation doesn't quite address the question... but it's close.
    The real question is what "based on UTC time" means, vs. "UTC time"
    Assume your SCCM server is set to deploy the update at 8PM UTC, but Windows time on your SCCM server (due to the time zone it is in) is configured for UTC-2, which is 6PM when "true" UTC is at 8PM.  When does the update happen?  8PM (true
    UTC time), or 6PM (SCCM server time "based on" UTC", which includes the offset)?  I understand that all target servers will deploy simultaneously (since we selected UTC instead of local), but is that simultaneous time "true" UTC,
    or the SCCM server UTC +/- offset?

  • Creating an html file in XI using an xsl stylesheet  -- two error types

    Hi
    I am working on mapping an xml invoice to an html-file using a stylesheet  (xsl-file)  in the message mapping in XI 3.0.
    Thus the inbound message is an xCBL Invoice and the output message is to be an html file. I name the output file "%supplierid%_%invoiceid%.html using the variable substitution functionality in the communication channel.
    I have two problems:
    1) the <br/> tags in the stylesheet are changed to "<br>" in the resulting html file causing problems in the output file, as this is not valid XML.
    2) I would like to insert the current date and time in the output file and I am using this code, but the date and time is not picked up:
    <B>
          Received:
          <xsl select="xs:string(fn:current-dateTime())"></xsl>
    </B>
    How do I solve these two problems?
    BR
    MIkael

    please note, that it is the tag "br/" that is changed to "br" in the html file.

  • Using multiple dates in WHERE clause

    I have a multiple select box in a form. I am trying to select
    records in SQL using the list that this form field produces. They
    are dateTime values. How do I use this list in the WHERE clause of
    my select statement?

    Man, I really hate posting anywhere near Dan - I've been
    watching his mastery for years. (Talk about the big leagues) But
    here goes anyway...
    I've gotten my little behind kicked by more than a view date
    issues, and I have basically gotten away from exact matches (unless
    you really need them).
    I'd probably do something like this:
    SELECT field1,field2...
    WHERE datetime_column_in_db > (OR LTE,OR GT/LT)
    '#datetimeformatyoulike(form.datetimevalue1)#
    Basically, finding records in RELATION to the form's datetime
    value has always been much easier for me.
    And God (and Dan) have mercy on my soul...

  • Average calculations with dates

    Hi,
    I have a problem with calculating the average time a call lasts. I have a start and finish time to a call that are stored in a database in datetime format. How do i find out the time of the call and then get an average over the number of calls made in a month. I have to hold the time format and show the result in the same time format that is in the database. How do you do this? I know how to do it with decimals but how to manipulate time confuses me.
    Cheers
    Niall

    You can use the method getTime() of the class java.sql.Timestamp, which returns milliseconds in the long type, and toString() method of java.sql.Time may serve your aim here.

  • Windows Phone - Chase Banking App - support will end?

    I have a Nokia 920, Win 8.1, I do online banking with Chase bank. App works very well. When I log in, here's an unfortunate message:  "We will no longer support the Chase Mobile app for Windows Phone as of 3/222/2015 and this app has been removed
    from the Windows Phone Store."  Also, I live in Connecticut; also bank at Webster bank, no mobile app for them on WinPhone, other phones are supported, any plans to work with Webster bank? Thanks.

    Every item in my MessagesExchanged collection actually has two values(updated my original post) one is the string which is a message and another one is a string which has the datetime value. How do I represent this in my existing model MyMessageModel 
    so that timestamp text is also set ?
    And I actually tried the below code in my Chat.xaml.cs OnNvagitedTo() method  but it didn't set the ui values in chat.xaml. What am I doing wrong here ?
    // item is a MyMessageModel object created in a previous step which is not null and has some valid data
    MyMessageViewModel = new MyMessageViewModel();
    if (item.MessagesExchanged==null)
    item.MessagesExchanged = new System.Collections.ObjectModel.ObservableCollection<string>();
    item.MessagesExchanged.Add("Hello from Me.This is just a sample message from Me.");
    myMessageViewModel.CurrentMessageModel = item;
    Updated my original post to set the ui values by model name. And also i realized Itemsource needs to set another textbox ui value which is timestamp. How do I modify my model's observable collection to take this value also ? In future I may have images also
    exchanged in the messages so how should I modify this MessagesExchanged observable collection ?? CurrentMessageModel is the property of type MyMessageModel
     defined in the ViewModel
    Any help would be greatly appreciated...
    Krrishna

  • NetSuite Integration - Anyone built a dashboard for EchoSign in NetSuite

    NetSuite users are familiar with dashboards.
    Would be nice to have a dashboard for - signers (list of things to sign) - approvers - initialiers -- etc.
    Also a dashboard - status of document not yet signed or outstanding or signed or ??
    Just wondering if anyone else has already built that.
    -- Im interested in creating a forum for users of NetSuite / EchoSign - lots to learn - lots of options
    Thanks

    Wildmight - thanks for the reply. This column is coming just from a straight Oracle date field, and in the physical / business layer it's represented as a datetime. Re: how do I pass the value - I use the default OBIEE functionality that passes the values of the cell you click on to the navigated report (i.e. on the "target" page 2, I set filters with the "is prompted by" for columns load number and load start date - they just magically get passed by default when you click on the row in the first page.
    Also, it really doesn't seem to be a "format" error - the reports are clearly saying 12:15 PM on one page, and 12:15 AM on the other. It feels like OBIEE is somehow converting it when it passes the parameter back and forth - but I'm not sure where to look to "modify" it's behavior. Also strange that it does it for the noon hour only - anything else, AM or PM, works fine, but everything between 12:00:00 PM and 12:59:59 PM gets this error.
    Thanks!
    Scott

  • How to return a single datetime from multiple rows of MAX(value) in DAX

    Hi
    I have a Results table with ResultTime, Balance, Equity which is updated with a new row every 5 minutes. I've used SUMX to find opening and closing balances and it has worked so far.
    Res_OpeningBalance:=SUMX(TOPN(1,Results,Results[ResultTime],1),[Balance])
    Res_ClosingBalance:=SUMX(TOPN(1,Results,Results[ResultTime],0),[Balance])
    But when I tried it with dates, the whole thing fell apart.
    Res_MaxBalance_Date:=SUMX(TOPN(1,Results,Results[Balance],0),[ResultTime])
    Since the highest Balance is likely to be represented through many rows due to it lasting more than 5 minutes, ResultTime (which is unique to each row) is summed up and returns messed up dates well into the future. How to return only one date (first or last
    datetime) from the rows where Balance is at max?
    I tried a TOPN of TOPN, but Excel was not amused.
    =SUMX(TOPN(1,Results,Results[Balance],0),TOPN(1,Results,Results[ResultTime],0))
    TIA!
    Re
    Dennis

    I still don't understand RANKX, but I figured it out anyway. I get the correct data by using:
    Res_MaxBalance:=MAX(Results[Balance])
    Res_MaxBalanceDate:=CALCULATE(MAX(Results[ResultTime]),FILTER(Results, Results[Balance]=MAX(Results[Balance])))
    Res_MinBalance:=MIN(Results[Balance])
    Res_MinBalanceDate:=CALCULATE(MAX(Results[ResultTime]),FILTER(Results, Results[Balance]=MIN(Results[Balance])))
    Res_MaxEquity:=MAX(Results[Equity])
    Res_MaxEquityDate:=CALCULATE(MAX(Results[ResultTime]),FILTER(Results, Results[Equity]=MAX(Results[Equity])))
    Res_MinEquity:=MIN(Results[Equity])
    Res_MinEquityDate:=CALCULATE(MAX(Results[ResultTime]),FILTER(Results, Results[Equity]=MIN(Results[Equity])))
    Re
    D

  • How to calculate the time duration on a datetime column?

    Hi guys,
    I've done some search on this forum and everywhere else but I can't seem to get this right, at the beggining it sounded like something very simple to accomplish, for the instance with Excel but I'm struggling to get it to work with Crystal Reports on Microsoft Visual Studio 2008.
    I have a datetime column (SQL Server 2000) that I wanted to calculate the the time duration on the report group footer, unfortunatelly the built-in SUM function cannot be applied and I've tried several formulas that I've found on the internet without any luck. I'm using a datetime column to store only the time because I'm stuck with SQL Server 2000 which doesn't have a time data type.
    Would you guys know how to do it by any chance?
    Some sample code I've tried: http://www.minisolve.com/TipsAddUpTime.htm
    Thanks a lot,
    Paul
    Edited by: Paul Doe on Dec 12, 2009 5:41 PM
    Some sample data:
    EMPLOYEE     WORK HOURS
    =========     =================
    JOHN DOE      1900-01-01 01:00:05
    JOHN DOE      1900-01-01 00:20:00
    JOHN DOE      1900-01-01 01:30:15
    =========     =================
    HOURS WORKED: 02:50:20
    Edited by: Paul Doe on Dec 12, 2009 5:42 PM
    Edited by: Paul Doe on Dec 12, 2009 5:45 PM

    Guess what, by further testing the code on the website mentioned above I got it working.
    Pus, I needed to change the grouping on the code, so I had to come up with a way to update the formulas based on the groupping field.
    Considering "call_date" is the field that you are groupping by on the designer use the following code to update the formula:
    CrystalReportObj = new ReportDocument();
    CrystalReportObj.Load("C:\\reportfile.rpt");
    FieldDefinition FieldDef;
    //Get formula
    FormulaFieldDefinition FormulaDef1;
    FormulaDef1 = CrystalReportObj.DataDefinition.FormulaFields["SubHours"];
    //Get formula
    FormulaFieldDefinition FormulaDef2;
    FormulaDef2 = CrystalReportObj.DataDefinition.FormulaFields["subMinSec"];
    //Update the formula to work with the new grouping field,
    //this must be called first else will throw an exception
    FormulaDef1.Text = FormulaDef1.Text.Replace("call_date", "call_extension");
    FormulaDef2.Text = FormulaDef2.Text.Replace("call_date", "call_extension");
    //Get the new field we are grouping by
    FieldDef = CrystalReportObj.Database.Tables[0].Fields["call_extension"];
    //Replace current grouping field with the new one,
    //considering there only one group in the report, index 0
    CrystalReportObj.DataDefinition.Groups[0].ConditionField = FieldDef;
    Have fun.
    Edited by: Paul Doe on Dec 12, 2009 8:43 PM
    Edited by: Paul Doe on Dec 12, 2009 8:53 PM

  • How to get DATETIME value in a page?

    Hi,
    I have two pages.
    In page1, I have a table that contain MessageStyleText item(AuditTime) and the attribute data type is DATETIME .
    I want to pass AuditTime value from page1 to page2.
    I am passing the AuditTime value from page1 to page2 using Destination URI.
    The AuditTime value is 2008-11-11 12:45:31.0
    How to get the AuditTime in page2 so that I can get the exact value '2008-11-11 12:45:31.0' ?
    Please help.
    Thanks & Regards,
    Sagarika

    Hi
    I am passing the value using the following destination URI,
    OA.jsp?page=/uttara/oracle/apps/uttaraimc/audit/webui/Page2&auditTime={@AuditTime}&retainAM=Y
    In the database the AuditTime value is like '2008-11-11 12:45:31.0'
    Normally we are using pageContext.getParameter("auditTime"); to get the value which are passed in destination URI.
    Here if I'll use pageContext.getParameter("auditTime"); I am not getting the correct value.
    How to get the exact value?
    Thanks & Regards,
    Sagarika

  • How To Get Only Month or Only Year from datetime format of yyyy-mm-dd

    Hi SQL gurus,
    I have field has datetime format of yyyy-mm-dd (ie. 2014-11-28).  Could anyone please educate me on how to extract only month (ie. November but not 11) and only year (ie, 2014) from 2014-11-28.  I writing two report have title of Number of
    sick leaves on November  and Number of sick leaves in 2014.  I am planning to extact 11 from 2014-11-28 and display as November on report title and the same goes for 2014.  Unless you have better non complicated way.   Thank you
    very much in advance.  DingDong!!

    There are multiple ways
    Month name
    SELECT DATENAME(mm,@DateParam)
    SELECT FORMAT(@DateParam,'MMMM')
    Year
    SELECT FORMAT(@DateParam,'yyyy')
    SELECT DATEPART(yy,@DateParam)
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • How to set a default value in a DateTime field?

    Hi!, how do you set a default value in a DateTime field in a user table to the value of "today"?
    Thank you!

    It's in SAP Business One 2007, in User-Defined-Fields, under User Tables, Iam trying to add a field to a Table I created in the User-Defined-Tables-Setup menu.
    I click Add then type the field name, description and then I select the Type, which is DateTime, then the SelectDefault Value For Field get's grayed out.
    Thank you!

Maybe you are looking for