Fill in the string that is converted to DATETIME

Dear all

I back campos start date y end date. Based on another field called value start end date is filled with time. But the end date value is appearing as 19 may 2015 00:00:00 I want to fill in real time.

I am using following code.

DateFormat trainer;

java.util.Date EndDate;

Formatter = new SimpleDateFormat ("dd-MMM-yyyy hh: mm :"); ")

EndDate = formatter.parse (EndDateTime);

java.sql.Date sqlDate = new java.sql.Date (EndDate.getTime ());

oracle.jbo.domain.Date eDate = new oracle.jbo.domain.Date (EndDate);

System.out.println ("end date time is:" + EndDateTime);

LinesVO.getCurrentRow () .setAttribute ("EndTime", EndDate);

Hello

Use these import instructions

import oracle.jbo.domain.Date;
import oracle.jbo.domain.Number;

Use the code below and see what happens.

OAViewObject LinesVO = (OAViewObject)getCreditNoteLinesVO1();

Date StartDateTime = (Date)LinesVO.getCurrentRow().getAttribute("StartTime");
Number vHours      = (Number)LinesVO.getCurrentRow().getAttribute("Hours");

DateFormat dateFormat = new SimpleDateFormat("dd-MMM-yyyy HH:mm:ss");
Calendar cal = Calendar.getInstance();
cal.setTime(StartDateTime);
System.out.println("Start Time : " + dateFormat.format(cal.getTime()));   

int hourValue = 0;
if (vHours != null)
{
  hourValue = vHours.intValue();
}
cal.add(Calendar.HOUR, hourValue);

System.out.println("End Time : " + dateFormat.format(cal.getTime()));
Date endDateTime = new Date(new java.sql.Timestamp(cal.getTime().getTime()));

LinesVO.getCurrentRow().setAttribute("EndTime",endDateTime);

Let us know what happens when you use this code.

See you soon

AJ

Tags: Oracle Applications

Similar Questions

  • Is user of my site need Web DC acrobat to be able to fill in the form that I convert?

    I need help understanding... I have several forms that are currently just a PDF read only format. I want to convert them to a form that users can fill out online and submit. A few questions:

    1. the user must have acrobat DC even use the service to "fill"?

    2. can I create a form that users can fill with the exception of the signature? Once filled, they would be able to print the pdf to office form to sign and fax in. My client must be HIPPA compliant and is cautious of the GIS online.

    Hi chelseam,

    People who need to fill out the form can do it using the free Adobe Reader, you can download from this page: https://get.adobe.com/reader.html.

    Best,

    Sara

  • I'm trying to sign several documents and I have my saved signature under "fill & sign" the organization that generated the forms highlighted the signature lines and when I try to put my signature, it is pushed outside the signature.

    I'm trying to sign several documents and I have my saved signature under "fill & sign" the organization that generated the forms highlighted the signature lines and when I try to put my signature, it is pushed outside the signature.

    Hi katepell,

    You can simply drag the signature to the desired place by holding it with the mouse.

    Thank you

    Abhishek

  • Unable to automatically fill in the fields that have a Global data link

    Hello

    I have a long form LCD with a button at the top that I use to fill in the form with the test data.  Then this button has a whole bunch of "rawValue = _" of statements.  But some of the fields in the form use global data binding, and the button won't just fill in these fields.  So, I always fill in these fields manually whenever I want to test.  Can someone tell me if there is a way around this?  Thanks for any help.

    Kam.

    Just figured out the answer myself.  The issue has been one of the issues being filled was a yes / no radio not button who was in command of "xfa.host.resetData" in it.  So whenever this radio button is checked, the function resetData will prepare the fields in this section, and then of course everywhere elsewhere due to binding global data.  I have removed the function resetData and the problem resolved.

  • Fill out the strings of QSettings to ArrayDataModel

    Hello

    I want to read several QSettings strings and then fill in an ArrayDataModel.

    So with this code, I've saved several channels in QSettings:

    void ApplicationUI::saveDataInQSettings(QList filepath) {    QSettings settings;
        settings.beginWriteArray("filepaths");
        for (int i = 0; i < filepath.size(); ++i) {
            settings.setArrayIndex(i);
            settings.setValue("filepath", filepath.at(i));
        }
        settings.endArray();
    }
    

    Now, I want to recover the QSettings channels as follows. I have a C++ function that fills the QSettings strings in a QList:

    QList ApplicationUI::fillQSettingsInQList() {
        QList filepaths;
    
        QSettings settings;
        int size = settings.beginReadArray("filepaths");
        for (int i = 0; i < size; ++i) {
            settings.setArrayIndex(i);
            QString filepath;
            filepath = settings.value("filepath").toString();
            filepaths.append(filepath);
        }
        settings.endArray();
        return filepaths;
    }
    

    In my main.qml, I have a NavigationPane containing a container in which the ArrayDataModel is displayed.

    I put the fillQSettingsInQList () - method in onCreationCompleted then I have the TI in QML when the application is open:

    [...]NavigationPane {
        id: navigationPane
    
        onCreationCompleted: {
            Qt.app = app;
    
            var filepaths = app.fillQSettingsInQList();
        }
    

    But how can I now fill this strings in the ArrayDataModel?

    Thanks for the replies. I have not used the track with a list of the QStrings. It is now much simpler.

    I saved the ArrayDataModel strings in the QSettings in this way. First of all, I saved the channels how I'll put in the QSettings and different channels:

    void ApplicationUI::saveDataModelInQSettings(bb::cascades::ArrayDataModel* model) {
        QSettings settings;
        settings.setValue("size", model->size());
        for (int i = 0; i < model->size(); i++) {
            QVariantMap map = model->value(i).toMap();
            settings.setValue("string_" + QString::number(i), map.value("string"));
        }
    }
    

    And completely action to get the information back to the ArrayDataModel of the QSettings:

    void ApplicationUI::fillQSettingsInDataModel(bb::cascades::ArrayDataModel* model) {
        QSettings settings;
        int size = settings.value("size", 0).toInt();
        for (int i = 0; i < size; i++) {
            QString filepath = settings.value("string_" + QString::number(i), "String not found").toString();
            model->append(filepath);
        }
    }
    
  • How to fill out the lines that have been drawn with the paint brush tool?

    I keep trying to use the paint bucket tool, and it does not. I need help, because I need to work on this animation.

    It is usually because there are gaps in the line. There is a trick which called narrow gaps that is available when you click on the paint bucket tool. Select one of the options, and it's much easier to fill something drawn with a brush.

  • Fill the string

    I need to fill out the string "ABC" with a 'K' character, that chain will now have 15 characters. Is this possible with sql?

    Try using LPAD or RPAD Functions (if I understand your requirements correctly):
    Something like:

    SQL> SELECT RPAD('ABC', 15, 'K') new_string FROM Dual
      2  /
    
    NEW_STRING
    ---------------
    ABCKKKKKKKKKKKK
    
    1 row selected.
    
    SQL> SELECT LPAD('ABC', 15, 'K') new_string FROM Dual
      2  /
    
    NEW_STRING
    ---------------
    KKKKKKKKKKKKABC
    
    1 row selected.
    
    SQL> 
    

    I hope this helps.
    Kind regards
    JO

  • Filled in form PDF to Word convert

    I have a PDF document to fill I saved on the 10 fields on it. I want to convert it to Word. When I do this, the document Word always displays empty fields without the information I entered.

    How can I get a Word document that has filled in the fields that appear in the PDF?

    Hi GordonPrince,

    In order to save the data entered in a PDF form in Reader, PDF form must be active drive. Please see Adobe Acrobat X Pro * allow Reader users to save form data for more information.

    Best,

    Sara

  • Analyzes the string and extract the string delimiter

    Hello

    Basic questions.  Is this possible with the scan of regular expression of the string to extract the string that are in the specified delimiters.  Here is an example:

    Name of the \\Name of the folder 1\Name to the folder 2\Name to the folder 3\File

    Chain analysis can produce the following by specifying the regular expression on the right:

    1 folder name

    Name of the folder 2

    Name of the folder 3

    File name

    I tried \\\%s\\%s\\%s\\%s but the %s stops on the first white space.

    Thank you

    Michel

    RavensFan suggested the service appropriate for your condition, but you can also use an alternative, which is "spreadsheet of array of strings.

  • flatten channel adds the length of the string

    Hi all

    I flatten a cluster chain help to flatten to string.vi. The cluster contains strings and arrays. The flattened string contains the length of the string that is appended to the string.

    So if I have a cluster with only 1 string and a value = "LabVIEW". the flattened string would be "0007LabVIEW". Flatten channel vi has a Boolean entry "add string or array of size? even if I set the Boolean value false, it always adds the length of the string. Is this a bug?

    I think that if you read the detailed help to flatten it to string function you will see this is not a bug.  That boolean applies only to top-level data, once put you something in a cluster or array, the Paris are open.

  • Way to access compose the strings of the phone app?

    I'm developing on a device 7290 with software version 4.1 4.1/JDE.  I was wondering if there was a way to get the string that you entered in the phone app.  I'm doing this because I want to do a somewhat native mechanism for composition of phase two with a number stored in my application.  So when a user dials the number, they have the possibility of either compose regularly (already there, of course) or using my Dialer of two floors in the menu.

    The only thing I can think is to try recording an ApplicationMenuItem in the phone app.  I don't know if the object that is returned in the 'context' ApplicationMenuItem will contain the number you entered or if it would be just an entry PhoneLog for the prerequisites.  Runs tests on this one there would reveal the answer, the inspection of the object with getClass() calls and/or execution in the debugger for more details on the returned object.

  • How to convert the string to a full decimal point and left shift

    Hey guys I tried to convert gps string to an integer, like this

    A string that is 2467.8976 and I need to convert it to a similar integer as point of this 2467.8979 so that I can shift the decimal point to the left (24.678979) which i coudnt do it with the chain. It's just been my 2 weeks with the labview so be gentle. Thank you

    Hi Awais07,

    Once you have created an indicator that signals the output of parsing the string, right-click on this indicator > display... Format > increase the value of the digit 9

    Kind regards

    Lennard.C

  • What is the best way to convert an array of bytes or string cluster

    I am writing a program that sends UDP packets and I defined the data I want to send via large groups (with numbers of u8, u16/u32, u16/u8/u32 tables and nested groups). Just before sending the data, I need to convert groups or chains of arrays of bytes. The flatten the string function is almost perfect for this. However, it is addition of lengths in the tables and strings that makes this unusable method, because as far as I can tell.

    As I have many of these groups, I would rather not hard code the unbundle names and conversion/cast of strings or arrays of bytes for each of them.

    Y at - it a function, or a tool that I'm on?

    Thank you!

    mkirzon wrote:

    The program I'm developing is to communicate and to poll an external device that includes a Protocol well documented. The messages that I built in clusters contain components accurate that expected from the other device. So, if my program adds any additional info (such as this array/string lengths), monitor the device external won't recognize messages and returns an error.

    Unfortunately, you have to ungroup your cluster and collect the individual channels to concatinate.

  • How to convert the string with numbers in the table of Boolean 2D

    Hello

    I have input a string with comma separated numbers 1,192 (starting at 1).

    This string must be converted to a table 2D-boolean. Each number that appears should be true, not true rest.

    The 2D table consists of 4 times of 0.47 Boolean values.

    1.48--> [0.47] numbers [0]
    49.96--> [0.47] numbers [1]
    Numbers 97.144--> [0.47] [2]
    145.192--> [0.47] numbers [3]

    If a '1, 49, 97 145' input string put all [0] [0.3] true.

    How can it be easy/fast resolved?

    Thanks for help

    Break the string of numbers in a table of numbers.  (Spreasheet String to Array).

    In a loop For, index with each issue of this table.  Use in the range and Coerce to see if it is in the range of numbers.  (You can put this in a loop For as auto good indexing through the ranges).  If it's in the range, then use subset replace table to activate the corresponding item in a real.  If this is not the case, do nothing.  Maintain the table of Boolean in a shift register.

    Repeat this step for each number in your table.

    (What is a class assignment?)

  • How do to convert the string (with the Hex data) in number?

    Hello

    I use TestStand 3.5 to automate a few test cases associated with boot loader.

    The requirement is that I need to read the value in some places for specific address. The values of these addresses are stored in a hexadecimal format.

    We have a step customized in TestStand through which we can read these values by address, but she returns as the type "String".

    For example, the value to 0 x 0000008 is 000001 B 2, and he returned in Locals.Value_Read as "000001 B 2" in the string.

    Is it possible, I can convert the string "000001 B 2" to a number?

    I tried to use the function-> val (locals. Value_Read), but it is return 0 as TestStand figures that the input string is not representing the valid number.

    Please help me with this.

    Thank you and best regards,

    Niraj.

    Try: Val ("0 x" + Locals.Value_Read)

Maybe you are looking for

  • want to know if the printer is supported

    Hello I keep looking at upgrading my machine under snow leopard at el capitan.  I'm trying to find out if my hp photosmart b110a is supported.  All I can find on the site of hp is a link for the drivers through the Apple print and fax preferences loa

  • split screen

    Plan Apple update iOS to allow iPhone users break the screen as iPads capabilities?  I have an iPhone 6 s more and would love to use two applications at the same time as does the Note4.  Very productive feature.

  • How can I update my payment

    How can I update my payment option?

  • Replacing a hard drive me

    I have a 2010 tour desk HPE 170 t running windows 7-64 bit. I got an error message saying hard drive failed Smart self-test. What I read this means that my hard drive will fail. I will try to install a new hard drive myself. I have two recovery disks

  • Not prompted to enter the password for the wireless connection.

    I have windows 7 and were able to access wifi trouble-free connections. However, today, I'm at a new location and when I click on the desired link I don't get no prompt to enter the password or key. I can access my computer connection currently wifes