Create timer using timestamp

Hi all,
I am controlling my inverter using LabVIEW. I need to create a timer, say like every morning at 8am, program for set A will execute.
At 5pm of everyday, program for set B will execute.
And the next day at 8am, program for set A will repeat. This will go on and on...
Has anyone got any idea?
I have a simple try. but it is not working. Please advise. Thanks!
JWong
Solved!
Go to Solution.
Attachments:
Test2.vi ‏196 KB

Attachments:
start,end timer2.vi ‏7 KB

Similar Messages

  • Urgent , not display the time using Timestamp

    Hello I need to know if the configuration of sunone 7 I can prevent that it sees the hours in a consultation Oracle.
    I am making a Select on a field type DATES, that you have date and hour.
    Use the TimesTamp class from java. It is not the Oracle nor the version of JDK.
    It is urgent!

    That is odd and I could only guess at the cause.
    If the file came from a digital camera the "code" for the timeline may be corrupt. This could happen if the capture was started and then stopped then resumed.
    I would also expect playback of the file to stop when QT Player reaches what "it thinks" is the end of the file. Hitting the play button may continue playback or it could return to the "beginning" of the file.
    You may be able to see the timeline by opening the "Movie Info" window. Leave it open as you play the file. Does the time appear in the Movie Info window?

  • Using Timestamp Object with day light saving time

    Hi,
    I am getting problem while using timestamp object with daylight saving time.
    I am in 'Europe/London' time zone.
    The summer time for this year starts on 30 March(last sunday) at 0200 hours.
    For hour 30/03/2003 01:00, I created a date object using SimpleDateFormat and then created the timestamp object using the longvalue got from dateObject.getTime();
    On printing the timestampObject.toString() it displays
    30/03/2003 00:00 BST.
    It seems that timestamp object uses the system timezone and I want it to be in GMT.
    Could you please tell me how can I get GMT time from timestamp object.
    When creating timestamp object from date

    To translate Date/Timestamp objects in a controlled way use DateFormat objects. When you create a DataFormat object you can specify a Locale object which stipulates timezone information.

  • I want to Connect my Mac Mini as a Slave to a Mac pro Server while at the same time using the Mac mini's thunderbolt ports peripherals ( ie monitor, Sound Card, Hard drives) Creating a poor man's new mac Pro. Can this be Done?

    I want to Connect my Mac Mini as a Slave to a Mac pro Server while at the same time using the Mac mini's thunderbolt ports peripherals ( ie monitor, Sound Card, Hard drives) Creating a poor man's new mac Pro. Can this be Done?

    Well, I really would love the new unreleased mac pro however , I'm not sure of the expected cost , Everyone speculates from $3,000 to $8,000, in which I may have to wait a while to purchase.
    To the point .... I want fully functional thunderbolt ports to be on the current mac pro's .... wonder if anyone had workarounds yet?...  or could I chain the the current mac pro to a mac mini to make that happen?

  • Error while creating Time Card Using API

    Hello
    I have a requirement to run OTL Interface once day to create/update Time Card in OTL for those datea created on sysdate-1 in Service Module (data will get feeded from Service Module). For example this interface will run on sysdate to create time cards for those data created in the service module on sysdate-1.
    I have some sample data and code I am using but it is erroring out with different errors..Can anybody help me on this
    My Interface should run as expected below and my time card range will be Monday 24-Dec-2012 to Sunday 30-Dec-2012
    Interface Run Date Time Entry to process
    25-Dec-2012 24-Dec-2012 Data
    26-Dec-2012 25-Dec-2012 Data
    CREATE OR REPLACE PROCEDURE main_process (o_errbuf OUT VARCHAR2,
    o_ret_code OUT NUMBER,
    l_chr_from_date IN VARCHAR2,
    l_chr_to_date IN VARCHAR2)
    IS
    l_chr_skip VARCHAR2 (1);
    l_chr_task_exists VARCHAR2 (100);
    l_chr_error_msg VARCHAR2 (4000);
    l_num_tbb_id NUMBER;
    l_num_request_id NUMBER := fnd_global.conc_request_id;
    l_num_login_id NUMBER := fnd_global.login_id;
    l_num_user_id NUMBER := fnd_global.user_id;
    l_num_resp_id NUMBER := fnd_Profile.VALUE ('resp_ID');
    l_num_otl_appl_id CONSTANT NUMBER (3) := 809; -- This is the appl_id for OTL, do not change
    l_chr_proj_attr1 CONSTANT VARCHAR2 (7) := 'Task_Id';
    l_chr_proj_attr2 CONSTANT VARCHAR2 (10) := 'Project_Id';
    l_chr_proj_attr3 CONSTANT VARCHAR2 (16) := 'Expenditure_Type';
    l_chr_proj_attr4 CONSTANT VARCHAR2 (19) := 'Expenditure_Comment';
    l_chr_proj_attr5 CONSTANT VARCHAR2 (23) := 'SYSTEM_LINKAGE_FUNCTION';
    i_num_count NUMBER;
    i_num_rows_inserted NUMBER := NULL;
    l_chr_message fnd_new_messages.MESSAGE_TEXT%TYPE;
    l_chr_hdr_eligible VARCHAR2 (5);
    l_tbl_timecard_info hxc_self_service_time_deposit.timecard_info;
    l_tbl_attributes_info hxc_self_service_time_deposit.app_attributes_info;
    l_tbl_messages hxc_self_service_time_deposit.message_table;
    l_new_timecard_id NUMBER;
    l_new_timecard_ovn NUMBER;
    l_num_time_building_block_id hxc_time_building_blocks.time_building_block_id%TYPE;
    I NUMBER; --PENDING REMOVE
    l_message VARCHAR2 (2000); --PENDING REMOVE
    l_time_building_block_id NUMBER; --PENDING REMOVE
    CURSOR process_line
    IS
    SELECT ROWID ROW_ID, a.*
    FROM xxpowl.xxpowl_hxt_otl_intf a
    WHERE 1 = 1 --a.request_id = l_num_request_id
    AND a.status_flag = 'NEW' -- 'VALID'
    AND a.error_desc IS NULL
    AND a.service_activity_type IS NOT NULL;
    BEGIN
    FND_FILE.PUT_LINE (
    fnd_file.LOG,
    'Entered From Date:'
    || (TO_DATE ( (l_chr_from_date), 'YYYY/MM/DD HH24:MI:SS')));
    FND_FILE.PUT_LINE (
    fnd_file.LOG,
    'Entered To Date:'
    || (TO_DATE ( (l_chr_to_date), 'YYYY/MM/DD HH24:MI:SS')));
    FND_GLOBAL.APPS_INITIALIZE (user_id => l_num_user_id,
    resp_id => l_num_resp_id,
    resp_appl_id => l_num_otl_appl_id);
    BEGIN
    FND_FILE.PUT_LINE (
    fnd_file.LOG,
    'Inserting the data in the custom table XXPOWL_HXT_OTL_INTF');
    INSERT INTO xxpowl.XXPOWL_HXT_OTL_INTF (SR_NUMBER,
    PROJECT_TASK_OWNER,
    PROJECT_TASK_OWNER_PERSON_ID,
    PROJECT_ID,
    PROJECT_TASK_ID,
    ASSIGNEE,
    ASSIGNEE_ID,
    ASSIGNEE_PERSON_ID,
    ASSIGNEE_SUPERVISOR_PERSON_ID,
    TASK_NUMBER,
    PARENT_TASK_NUMBER,
    DEBRIEF_NUMBER,
    DEBRIEF_HEADER_ID,
    DEBRIEF_DATE,
    TASK_ASSIGNMENT_ID,
    DEBRIEF_OBJECT_VERSION_NUMBER,
    DEBRIEF_PER_COMPLETE,
    DEBRIEF_LINE_ID,
    DEBRIEF_PROCESS,
    SERVICE_ACTIVITY,
    SERVICE_ACTIVITY_TYPE,
    INVENTORY_ITEM_ID,
    ITEM,
    BUSINESS_PROCESS_ID,
    DEBRIEF_TRANSACTION_TYPE_ID,
    DEBRIEF_UOM_CODE,
    DEBRIEF_HOURS,
    CONV_DEBRIEF_IN_HOURS,
    DEBRIEF_START_TIME,
    DEBRIEF_END_TIME,
    DEBRIEF_SERVICE_DATE,
    NOTES,
    OTL_ELIGIBLE_FLAG,
    NOTIF_SENT_FLAG,
    NOTIF_ELIGIBLE_FLAG,
    ERROR_DESC,
    STATUS_FLAG,
    INITIAL_NOTIF_SENT_DATE,
    CREATION_DATE,
    CREATED_BY,
    LAST_UPDATE_DATE,
    LAST_UPDATED_BY,
    LAST_UPDATE_LOGIN,
    REQUEST_ID,
    INITIAL_REQUEST_ID)
    (SELECT b.incident_number sr_number,
    h.resource_name project_task_owner,
    h.source_id project_task_owner_person_id,
    b.external_attribute_1 project_id,
    b.external_attribute_2 project_task_id,
    jtf_task_utl.get_owner (d.resource_type_code, d.resource_id)
    assignee,
    d.resource_id assignee_id,
    jrre.source_id assignee_person_id,
    paa.supervisor_id assignee_supervisor_person_id,
    c.task_number task_number,
    (SELECT task_number
    FROM jtf_tasks_b z
    WHERE c.parent_task_id = z.task_id)
    parent_task_number,
    a.debrief_number,
    a.debrief_header_id debrief_header_id,
    a.debrief_date debrief_date,
    a.task_assignment_id task_assignment_id,
    a.object_version_number debrief_object_version_number,
    a.attribute1 debrief_per_complete,
    e.debrief_line_id debrief_line_id,
    cbp.name debrief_process,
    cttv.name service_activity,
    DECODE (cttv.attribute1,
    'Y', 'Service-Billable',
    'N', 'Service-Non Billable')
    service_activity_type,
    e.inventory_item_id inventory_item_id, --f.segment1 item,
    (SELECT segment1
    FROM mtl_system_items_b f
    WHERE e.inventory_item_id = f.inventory_item_id
    AND f.organization_id = b.inv_organization_id)
    item, --241 --Mater Org
    e.business_process_id business_process_id,
    e.transaction_type_id debrief_transaction_type_id,
    e.uom_code debrief_uom_code,
    e.quantity debrief_hours,
    (g.conversion_rate * e.quantity) conv_debrief_in_hours,
    e.labor_start_date debrief_start_time,
    e.labor_end_date debrief_end_time,
    e.service_date debrief_service_date,
    (SELECT note_tl.notes
    FROM JTF_NOTES_B NOTE, JTF_NOTES_TL NOTE_TL
    WHERE NOTE.JTF_NOTE_ID = NOTE_TL.JTF_NOTE_ID
    AND NOTE_TL.LANGUAGE = USERENV ('LANG')
    AND NOTE.SOURCE_OBJECT_ID = a.DEBRIEF_HEADER_ID
    AND note.jtf_note_id =
    (SELECT MAX (note1.jtf_note_id)
    FROM JTF_NOTES_B note1
    WHERE NOTE1.SOURCE_OBJECT_ID =
    a.DEBRIEF_HEADER_ID))
    notes,
    'Y',
    'N',
    'X',
    NULL,
    'NEW',
    NULL,
    SYSDATE,
    l_num_user_id,
    SYSDATE,
    l_num_user_id,
    l_num_login_id,
    l_num_request_id,
    l_num_request_id
    FROM csf_debrief_headers a,
    cs_incidents_all_b b,
    jtf_tasks_b c,
    jtf_task_assignments d,
    csf_debrief_lines e, --mtl_system_items_b f,
    mtl_uom_conversions g,
    jtf_rs_resource_extns_vl h,
    cs_business_processes cbp,
    cs_transaction_types_vl cttv --, cs_sr_task_debrief_notes_v notes
    jtf_rs_resource_extns_vl jrre,
    per_all_assignments_f paa
    WHERE a.task_assignment_id = d.task_assignment_id
    AND d.task_id = c.task_id
    AND c.source_object_id = b.incident_id
    AND c.source_object_type_code = 'SR'
    AND a.debrief_header_id = e.debrief_header_id
    AND e.uom_code = g.uom_code
    AND g.uom_class = 'Time'
    AND b.incident_owner_id = h.resource_id(+)
    AND e.business_process_id = cbp.business_process_id
    AND e.transaction_type_id = cttv.transaction_type_id
    AND d.resource_id = jrre.resource_id
    AND jrre.source_id = paa.person_id --= 181
    AND TRUNC (SYSDATE) BETWEEN paa.effective_start_date
    AND paa.effective_end_date
    AND TRUNC (e.last_update_date) BETWEEN TO_DATE (
    (l_chr_from_date),
    'YYYY/MM/DD HH24:MI:SS')
    AND TO_DATE (
    (NVL (
    l_chr_to_date,
    l_chr_from_date)),
    'YYYY/MM/DD HH24:MI:SS')
    AND NOT EXISTS
    (SELECT 1
    FROM xxpowl.XXPOWL_HXT_OTL_INTF old
    WHERE old.debrief_header_id =
    e.debrief_header_id
    AND old.task_number = c.task_number
    AND TRUNC (old.DEBRIEF_SERVICE_DATE) =
    TRUNC (e.SERVICE_DATE)
    AND old.DEBRIEF_TRANSACTION_TYPE_ID =
    e.TRANSACTION_TYPE_ID
    AND old.request_id <> l_num_request_id
    AND old.DEBRIEF_UOM_CODE = e.uom_code
    AND old.DEBRIEF_HOURS = e.quantity));
    i_num_rows_inserted := SQL%ROWCOUNT;
    fnd_file.put_line (fnd_file.LOG,
    'No of rows Inserted:' || i_num_rows_inserted);
    COMMIT;
    EXCEPTION
    WHEN OTHERS
    THEN
    l_chr_error_msg :=
    l_chr_error_msg
    || 'Error while Inserting debrief lines data into custom table.Error: '
    || SQLERRM
    || '. Exiting the interface without processing further';
    fnd_file.put_line (fnd_file.LOG, l_chr_error_msg);
    ROLLBACK;
    RETURN;
    END;
    FOR process_line_rec IN process_line
    LOOP
    l_chr_error_msg := NULL;
    l_tbl_timecard_info.delete;
    l_tbl_attributes_info.delete;
    l_tbl_messages.delete;
    l_new_timecard_id := NULL;
    l_new_timecard_ovn := NULL;
    l_num_time_building_block_id := NULL;
    l_chr_message := NULL;
    i_num_count := 0;
    l_num_tbb_id := NULL;
    BEGIN
    hxc_timestore_deposit.create_time_entry (
    p_measure => process_line_rec.conv_debrief_in_hours,
    p_day => TO_DATE ( (process_line_rec.debrief_service_date),
    'DD/MM/RRRR'),
    p_resource_id => process_line_rec.assignee_person_id,
    p_comment_text => process_line_rec.notes
    || '....Remove this notes in the code logic....Request Id:'
    || l_num_request_id, --pending lokesh
    p_app_blocks => l_tbl_timecard_info,
    p_app_attributes => l_tbl_attributes_info,
    p_time_building_block_id => l_num_time_building_block_id);
    fnd_file.put_line (
    fnd_file.LOG,
    'Step#1 completed, TIME_BUILDING_BLOCK_ID:'
    || l_num_time_building_block_id);
    EXCEPTION
    WHEN OTHERS
    THEN
    l_chr_error_msg :=
    l_chr_error_msg
    || '.Error in INSERT API CALL at Step#1 for the debrief line id: '
    || process_line_rec.debrief_line_id
    || '.Error:'
    || SQLERRM;
    END;
    BEGIN
    -- Classify Time
    -- Attribute1
    hxc_timestore_deposit.create_attribute (
    p_building_block_id => l_num_time_building_block_id,
    p_attribute_name => 'Task_Id',
    p_attribute_value => process_line_rec.project_task_id,
    p_app_attributes => l_tbl_attributes_info);
    EXCEPTION
    WHEN OTHERS
    THEN
    l_chr_error_msg :=
    l_chr_error_msg
    || '.Error in INSERT API CALL at Step#2 for the debrief line id: '
    || process_line_rec.debrief_line_id
    || '.Error:'
    || SQLERRM;
    END;
    BEGIN
    -- Attribute2
    hxc_timestore_deposit.create_attribute (
    p_building_block_id => l_num_time_building_block_id,
    p_attribute_name => 'Project_Id',
    p_attribute_value => process_line_rec.project_id,
    p_app_attributes => l_tbl_attributes_info);
    EXCEPTION
    WHEN OTHERS
    THEN
    l_chr_error_msg :=
    l_chr_error_msg
    || '.Error in INSERT API CALL at Step#3 for the debrief line id: '
    || process_line_rec.debrief_line_id
    || '.Error:'
    || SQLERRM;
    END;
    BEGIN
    -- Attribute3
    hxc_timestore_deposit.create_attribute (
    p_building_block_id => l_num_time_building_block_id,
    p_attribute_name => 'Expenditure_Type',
    p_attribute_value => 'Service-Billable',
    -- p_attribute_value=> 'Service-Non Billable',
    p_app_attributes => l_tbl_attributes_info);
    EXCEPTION
    WHEN OTHERS
    THEN
    l_chr_error_msg :=
    l_chr_error_msg
    || '.Error in INSERT API CALL at Step#4 for the debrief line id: '
    || process_line_rec.debrief_line_id
    || '.Error:'
    || SQLERRM;
    END;
    BEGIN
    -- Attribute4
    hxc_timestore_deposit.create_attribute (
    p_building_block_id => l_num_time_building_block_id,
    p_attribute_name => 'Expenditure_Comment',
    p_attribute_value => 'Expenditure Comment created by API',
    p_app_attributes => l_tbl_attributes_info);
    EXCEPTION
    WHEN OTHERS
    THEN
    l_chr_error_msg :=
    l_chr_error_msg
    || '.Error in INSERT API CALL at Step#5 for the debrief line id: '
    || process_line_rec.debrief_line_id
    || '.Error:'
    || SQLERRM;
    END;
    BEGIN
    -- Attribute5
    hxc_timestore_deposit.create_attribute (
    p_building_block_id => l_num_time_building_block_id,
    p_attribute_name => 'SYSTEM_LINKAGE_FUNCTION',
    p_attribute_value => 'ST',
    p_app_attributes => l_tbl_attributes_info);
    EXCEPTION
    WHEN OTHERS
    THEN
    l_chr_error_msg :=
    l_chr_error_msg
    || '.Error in INSERT API CALL at Step#6 for the debrief line id: '
    || process_line_rec.debrief_line_id
    || '.Error:'
    || SQLERRM;
    END;
    BEGIN
    hxc_timestore_deposit.execute_deposit_process (
    p_validate => FALSE,
    p_app_blocks => l_tbl_timecard_info,
    p_app_attributes => l_tbl_attributes_info,
    p_messages => l_tbl_messages,
    p_mode => 'SAVE', -- p_mode-> 'SUBMIT', 'SAVE', 'MIGRATION', 'FORCE_SAVE' or 'FORCE_SUBMIT'
    p_deposit_process => 'OTL Deposit Process',
    p_timecard_id => l_new_timecard_id,
    p_timecard_ovn => l_new_timecard_ovn);
    COMMIT;
    hxc_timestore_deposit.log_messages (p_messages => l_tbl_messages);
    IF (l_tbl_messages.COUNT <> 0)
    THEN
    l_chr_error_msg :=
    l_chr_error_msg
    || '.Error in INSERT API CALL at Step#7 for the debrief line id: '
    || process_line_rec.debrief_line_id
    || '.Error:'
    || SQLERRM
    || '.API Error messages are:';
    i_num_count := l_tbl_messages.FIRST;
    LOOP
    EXIT WHEN (NOT l_tbl_messages.EXISTS (i_num_count));
    l_chr_message :=
    fnd_message.get_string (
    appin => l_tbl_messages (i_num_count).application_short_name,
    namein => l_tbl_messages (i_num_count).message_name);
    fnd_file.put_line (
    fnd_file.LOG,
    (l_tbl_messages (i_num_count).message_name));
    l_chr_error_msg := l_chr_error_msg || l_chr_message || '.';
    i_num_count := l_tbl_messages.NEXT (i_num_count);
    END LOOP;
    END IF;
    EXCEPTION
    WHEN OTHERS
    THEN
    fnd_file.put_line (
    fnd_file.LOG,
    '**** Error.....Inside Exception Block in execute_deposit_process');
    BEGIN
    hxc_timestore_deposit.log_messages (
    p_messages => l_tbl_messages);
    EXCEPTION
    WHEN OTHERS
    THEN
    fnd_file.put_line (
    fnd_file.LOG,
    '*****Error....Inside Exception Block in hxc_timestore_deposit.log_messages.Error:'
    || SQLERRM);
    END;
    l_chr_error_msg :=
    l_chr_error_msg
    || 'Error in INSERT API CALL at Step#7 for the debrief line id: '
    || process_line_rec.debrief_line_id
    || '.Error:'
    || SQLERRM
    || '.API Error messages are:';
    IF (l_tbl_messages.COUNT <> 0)
    THEN
    i_num_count := l_tbl_messages.FIRST;
    LOOP
    EXIT WHEN (NOT l_tbl_messages.EXISTS (i_num_count));
    l_chr_message :=
    fnd_message.get_string (
    appin => l_tbl_messages (i_num_count).application_short_name,
    namein => l_tbl_messages (i_num_count).message_name);
    l_chr_error_msg := l_chr_error_msg || l_chr_message || '.';
    i_num_count := l_tbl_messages.NEXT (i_num_count);
    END LOOP;
    END IF;
    END;
    COMMIT;
    IF l_chr_error_msg IS NOT NULL OR l_new_timecard_id IS NULL
    THEN
    fnd_file.put_line (fnd_file.LOG,
    '***** Error *****' || l_chr_error_msg);
    o_ret_code := 1;
    END IF;
    BEGIN
    fnd_file.put_line (
    fnd_file.LOG,
    'Updating the status of the record in custom table for debrief_line_id:'
    || process_line_rec.debrief_line_id);
    UPDATE xxpowl.XXPOWL_HXT_OTL_INTF
    SET status_flag =
    DECODE (
    l_chr_error_msg,
    NULL, DECODE (
    l_new_timecard_id,
    NULL, 'FAILED',
    DECODE (SIGN (l_new_timecard_id),
    '1', 'SUCESS',
    'FAILED')),
    'FAILED'),
    time_building_block_id = l_new_timecard_id,
    last_update_date = SYSDATE,
    request_id = l_num_request_id,
    last_updated_by = l_num_user_id,
    error_desc = l_chr_error_msg
    WHERE ROWID = process_line_rec.row_id;
    COMMIT;
    EXCEPTION
    WHEN OTHERS
    THEN
    l_chr_error_msg :=
    l_chr_error_msg
    || '.Error while updating the status to SUCCESS.Error: '
    || SQLERRM;
    END;
    END LOOP; --process_line
    EXCEPTION
    WHEN OTHERS
    THEN
    FND_FILE.PUT_LINE (
    fnd_file.LOG,
    'Unknown/Unhandlled Exception Error......' || SQLERRM);
    o_ret_code := 2;
    END main_process;
    SHOW ERR;
    Error Messages:
    1. Error in INSERT API CALL at Step#7 for the debrief line id: 41011.Error:ORA-00001: unique constraint (HXC.HXC_ROLLBACK_TIMECARDS_PK) violated.
    2. Error in INSERT API CALL at Step#7 for the debrief line id: 41011.Error:ORA-00001: unique constraint (HXC.HXC_LATEST_DETAILS_FK) violated
    Thanks a lot for the help!

    Hello
    We will get this error message when we run this from application other than "Time and Labor Engine". So try to run this concurrent program (if you registered as a conc. program) from Time and Labor Engine application.
    --Lokesh                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Need to create PIR using One Time Vendor

    Hi experts,
    I need to create Purchase Info. Record using One Time vendor (OTV) as the PIR field in PO is mandatory and as per the client requirement, this field cannot be changed to optional. 
    Is there any possibility to create PIR using OTV.
    Thanks
    Mohan

    You can create the PIR for one time vendor for material  with the vendor code similar to regular vendor PIR creation process. you can maintian the condition in PIR and same will be copied into PO.You need to check price during the PO since the price wil be change from vendor to vendor (since no fixed vendor is assigned). You can process GR/IR without any issues.Please let us know idf you need any specific requirement.
    warm regards
    Ramakrishna

  • Why we are using event receivers in creating timer jobs?

    Hi All,
    Why we are using event receivers in creating timer jobs?
    Thanks in advance!

    Hi,
    Suppose you are creating a custom timer job following the steps which are similar as what this demo provides:
    http://www.codeproject.com/Articles/403323/SharePoint-Create-Custom-Timer-Jobs
    In this demo, an Event Receiver is created for installing the Job Definition when we deploy the solution or uninstalling it when we extract this solution.
    Here, the Event Receiver listens to the FeatureActivated evetn and the FeatureDeactivating event, which corresponding to the timing of activating and deactivating the feature
    of this solution, it just like a switch during the life cycle of a solution in a SharePoint site collection which will make us easier to manage the features coming with a solution package.
    More information about feature and solution:
    http://msdn.microsoft.com/en-us/library/office/aa543214(v=office.14).aspx
    https://www.simple-talk.com/dotnet/.net-tools/using-features-and-solutions-to-deploy-your-sharepoint-customizations/
    Feel free to reply if this is not what your question about or there are still any questions.
    Best regards,
    Patrick
    Patrick Liang
    TechNet Community Support

  • File Created time changes when file renamed to previously used name

    Any ideas on this one would be very gratefully received:
    I am trying to rename a file then create a new one with the original name, as part of a solution to roll over log files after x days. 
    I found that the new file had the 'created time' of the original file, which messed up the logic badly. I tried to unpick this by creating the new file with a new name, then renaming it. The new file got the correct created time initially,
    but as soon as I renamed it to the original name, the created time reverted to the created time of the earlier file.
    I even tried simply deleting the old file altogether, but every attempt to get a new file with the original name resulted in the created time being that of the old file.
    I have used different filesystemobject instantiations for the old and new files, and I even tried creating the new file in a different run of the script, and in a different cmd session. The only thing that worked was logging out and in again before
    creating the new file!
    Since the created time attribute is not writeable, I'm struggling to get round this.
    Here is a stripped out version that demonstrates it. I have put 5 second waits in, so you can watch the created time get reset in front of your eyes when the new file gets renamed to the old name (might need to add a column for 'created time' to Windows
    Explorer)
    (OS is 2008 server R2 Enterprise)
    $logdir = ".\"
    $logfname = "roll.log"
    $RollAtDays = 0 # for testing - so it always creates a new file
    If ( -not ( test-path $logdir) ){ $newdir = New-Item $logdir -type directory } 
    $logfile = $logdir+$logfname
    $newlog = $logdir+$logfname+".new"
    $fso = New-Object -comobject Scripting.FileSystemObject
    $date = Get-Date
    # if file exists, test whether it requires rolling over
    If ( test-path $logfile ){
     $fo = $fso.GetFile( $logfile ) 
     $dc = $fo.DateCreated
     $RollDate = $dc.AddDays( $RollAtDays )
     # write-host "$dc $RollDate"
     If( $RollDate.CompareTo( $date ) -lt 0 ){
      write-host "Roll"
      $newPath = "$logdir$date-$logfname"
      $newPath = $newPath.Replace("/", "")
      $newPath = $newPath.Replace(" ", "-")
      $newPath = $newPath.Replace(":", "")
      $fo.Move( $newPath )
      #$fo.Delete( ) #tried both renaming and deleting the original file
      start-sleep -s 5
    # some code to create a file if one doesn't exist
    If ( -not ( test-path $logfile) ){
     $header = "Date"
     $fso1 = New-Object -comobject Scripting.FileSystemObject
     $ts1 = $fso1.CreateTextFile( $newlog, $True )
     $ts1.close()
     start-sleep -s 5
     $fo1 = $fso1.GetFile( $newlog ) 
     $fo1.Move( $logfile )  # this is where the created date gets changed back
     #add-content $logfile $header
    # some code to add a line to the log
    [string]$logline = "$date"
    #add-content $logfile $logline

    I have to disagree with the assessment that creation time is not writable:
    Get-Item test1.txt | select creationtime
    (Get-Item test1.txt).CreationTime = '07/03/2014'
    Get-Item test1.txt | select creationtime
    CreationTime
    3/20/2014 1:15:43 PM
    7/3/2014 12:00:00 AM
    [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "

  • Creating network using Time Capsule, Airport Extreme and Airport Express

    Hello, 
    Yesterday I purchased the 4th Gen Time Capsule to replace my Airport Extreme (4th gen) as my "main" router.  However, I want to repurpose my Airport Extreme to extend the network AND use the Ethernet ports to connect additional devices.  I will then use my Airport Express solely to "join the network" for Airplay purposes.
    I connected the Time Capsule directly to my cable modem using Ethernet.  I set up the Time capsule in Airport, checked the "allow this network to be extended" and used WPA2 Personal encryption.  I then set up the Airport Extreme to "join an existing network"  wirelessly and mimic the same network name, encryption type and password.  Finally, I set up the aiport express as I mentioned above.
    This setup does a great job of extending my network with increased performance.  However, when I plug my Mac into the Airport Extreme using ethernet, it does not recognize.  This Mac IS connected via Aiport.  However, under the "ethernet" option in the Network Menu, it says "No IP Address Found." 
    I've searched some other forums and thought this configuration would work.  Also, I apologize if this seems like and amateur post.  This is my first time using the Apple support Community.
    Thank you

    I set up the Time capsule in Airport, checked the "allow this network to be extended" and used WPA2 Personal encryption
    Those are the correct settings for the "main" router.
    I then set up the Airport Extreme to "join an existing network"  wirelessly and mimic the same network name, encryption type and password
    The AirPort Extreme does not provide any additional wireless coverage and the Ethernet ports are not enabled if the device is configured to "join a wireless network"
    Check your setttings using AirPort Utility - Manual Setup
    Click the Wireless tab located just below the row of icons
    Wireless Mode = Extend a wireless network
    Wireless Network Name = Same name as the Time Capsule wireless network
    Enter a check mark next to "Allow wireless clients"
    Wireless Security = Same setting as the Time Capsule wireless network
    Wireless Password = Same password at the Time Capsule wireless network
    Confirm Password
    Click Update at the lower right and allow 25-30 seconds for the AirPort Extreme to restart.
    Configured correctly, the AirPort Extreme will extend the wireless network and the Ethernet ports on the Extreme will be enabled.
    I good starting location for the extending device is a location about 1/2 to 2/3 the distance from the main router to the area that needs more wireless coverage.
    Once you have the AirPort Extreme configured and working correctly, post back if you would like a tip to find out exactly which device....your Time Capsule or the AirPort Extreme that your laptop is connected to at any given location.

  • Get the created time stamp of a file...

    Hi Guys,
    I am trying to get the created time stamp of a text file from oracle... How is this possible? I tried using UTL_FILE but didnt succeed so....
    Thanks...
    Edited by: Napster on Oct 21, 2010 12:43 AM

    You may try something like this.
    create or replace and compile java source named filehandler as
    import java.lang.*;
    import java.util.*;
    import java.io.*;
    import java.sql.Timestamp;
    public class FileHandler
      private static int SUCCESS = 1;
      private static  int FAILURE = 0;
    public static Timestamp lastModified (String path) {
        File myFile = new File (path);
        return new Timestamp(myFile.lastModified());
      }Then the wrapper
    CREATE OR REPLACE FUNCTION lastModified (p_path  IN  VARCHAR2) RETURN DATE
    AS LANGUAGE JAVA
    NAME 'FileHandler.lastModified (java.lang.String) return java.sql.Timestamp';PS: Not tested.

  • Notification Create time in PCO 2.1

    Hello,
    I am using PCo 2.1.6.0 and I have observed a difference of 4 hrs  between the Notification Create time and the time zone where actually PCo is installed.
    In my current scenario both PCo & the data source (OSI PI) are installed on the same server which follows the EDT/EST time zone.
    The notification message create date that is sent to MII (which also resides in the EST/EDT TZ) show a + 4 hrs (I think it shows GMT). I observe the same time when I do a "Test Notification Delivery" --> "View Sample" for a notification.
    On the PCo Mgmt Console if I navigate to Tools --> Options and further expand Global Properties and click Date/Time format the correct time is displayed.
    Additionally if I run a TAG query against the same Agent the correct time is returned.
    Why is there a difference for the notification then, when everything is in the same TZ? Am I missing some config setting in PCo?  
    I have not come across any SAP note on this issue and could not find any older posts referring to this behavior.
    Thanks for the help.
    Udayan
    Edited by: Udayan Upreti on Sep 19, 2011 9:30 AM

    Ud,
    Ok, so to fully answer your original question as to why there is a difference in the timestamps of a PCo notification and a MII Query to a PCo agent. 
    The notifications always use UTC which is universal time regardless of timezones or system settings and was agreed upon as the best approach to keep track of when messages were actually created.  If you want current timestamp of the server in the message payload you can add an Expression with the value of "datenow()" and I believe that this will give you the current timestamp of the PCo server.
    When you query a PCo agent from MII, the MII Time Engine will take care of the timezone conversion for you in order to ensure that date from the proper time ranges the user is asking for is returned to them.  Since the MII and PCo servers can be located in diffferent regions/timezones we have to handle this in our time engine.
    Does this make sense?
    Regards,
    Sam

  • Message Created time past the current time even accounting for set clock sk

    I'm getting the following when sending a message to a WebLogic 10.3 Web Service through OWSM security padding.
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header/>
    <env:Body>
    <env:Fault xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <faultcode>wsse:InvalidSecurityToken</faultcode>
    <faultstring>Security token failed to validate. weblogic.xml.crypto.wss.SecurityTokenValidateResult@39b53a[status: false][msg UNT Error:Message Created time past the current time even accounting for set clock skew]</faultstring>
    </env:Fault>
    </env:Body>
    </env:Envelope>
    On server side's TCP/IP Monitor I see the message received has <wsu:Created>2010-07-30T19:34:17Z</wsu:Created> in security header, the timestamp of TCP/IP Monitor showing time of request is 2010-07-30 12:32:51PM.
    Seems like the sender's clock is two minutes ahead of server.
    How do I adjust to lax the clock precision between client and server. Which side do I set the properties and what are the properties I need to set? Thanks

    Pam,
    from what i have gathered while trying to set mine up, the Time Capsule doesn't like other things broadcasting a wireless signal while it is trying to do the same... or at least, the other computers in the area can only recognize one at a time.
    So, in your case, you are using your MacBook Pro to wirelessly share the AirCard connection, right? If so, your computer is acting as a router, which means you have two devices trying to connect your computers to the same network wirelessly. I think this is why your computer isn't able to "see" your time capsule wirelessly. What i would recommend for you is to hook up your aircard to a computer that is not used very often, and (if it has a wireless adapter), turn the wireless adapter off. This way, you have only one device doing the wireless connecting (the Time Capsule in Bridge mode), which will direct internet traffic through ethernet to the connected computer.
    So, in conclusion, i just don't think it's possible to do what we want to do completely wirelessly.

  • Date Issue while creating Activity using BAPI_ACTIVITYCRM_CREATEMULTI

    Hi,
    I'm creating an activity using BAPI BAPI_ACTIVITYCRM_CREATEMULTI and this is working fine. The only thing which is not reflecting in the activity is the date which I'm passing to this BAPI. The system  always puts the default date, which is system date.
    Below are the parameters I'm passing in DATE and DATEX parameters of BAPI_ACTIVITYCRM_CREATEMULTI. Let me know if I'm doing something wrong.
    Can someone help me? Any help in resolving this would be appreciated and rewarded with points. Thanks!
        lt_date-ref_handle = lt_header-handle. "handle for activity
        lt_date-ref_kind   = 'A'. "Adm header
        lt_date-appt_type  = 'ORDERACTUAL'. "Order actual date type
        lt_date-date_from  = '20060120'. "e.g.
        lt_date-time_from  = '1200000'. "e.g.
        lt_date-date_to    = '20060120'."e.g.
        lt_date-time_to    = '1200000'. "e.g.
        lt_date-show_local = 'X'.
        lt_date-mode       = 'A'."Create
        lt_datex-ref_handle = 'X'.
        lt_datex-ref_kind   = 'X'.
        lt_datex-appt_type  = 'X'.
        lt_datex-date_from  = 'X'.
        lt_datex-time_from  = 'X'.
        lt_datex-date_to    = 'X'.
        lt_datex-time_to    = 'X'.
        lt_datex-show_local = 'X'.
        lt_datex-mode      = 'X'.
        append: lt_date, lt_datex.
    Regards,
    Sandeep

    Hi,
    Here is a sample code for you.
    *& Report  YAM_TEST_CONT_END_DATE                                      *
    REPORT  yam_test_cont_end_date                  .
    DATA: lit_header_guid TYPE crmt_object_guid_tab,
          lit_appointment TYPE crmt_appointment_comt,
          lit_status_comt TYPE crmt_status_comt,
          wa_status_comt  LIKE LINE OF lit_status_comt.
    DATA : lit_ret          TYPE TABLE OF bapiret2,
           lit_obj_to_save  TYPE TABLE OF bapibus20001_guid_dis,
           lit_saved_obj    TYPE TABLE OF bapibus20001_object_id.
    DATA: lv_header_guid   TYPE crmt_object_guid,
          lv_item_guid     TYPE crmt_object_guid,
          lv_timestamp(15) TYPE c.
    DATA: lit_fname TYPE crmt_input_field_names_tab,
          wa_fname  TYPE crmt_input_field_names.
    DATA: lit_input TYPE crmt_input_field_tab,
          wa_input  TYPE crmt_input_field.
    DATA: wa_appointment      TYPE  crmt_appointment_com,
          wa_logical_date_key TYPE  crmt_date_logical_date_key.
    CONSTANTS: lc_end       TYPE crmt_apptype     VALUE 'CONTEND',
               lc_appt      TYPE crmt_fieldname   VALUE 'APPT_TYPE',
               lc_from      TYPE crmt_fieldname   VALUE 'TIMESTAMP_FROM',
               lc_to        TYPE crmt_fieldname   VALUE 'TIMESTAMP_TO',
               lc_obj       TYPE crmt_object_name VALUE 'APPOINTMENT',
               lc_tzone_from(13) TYPE c           VALUE 'TIMEZONE_FROM',
               lc_tzone_to(11)   TYPE c           VALUE 'TIMEZONE_TO'.
    PARAMETER: p_objid TYPE crmt_object_id.
    START-OF-SELECTION.
    * Get the HEADER GUID for the Contract Number
      SELECT SINGLE guid
        INTO lv_header_guid
        FROM crmd_orderadm_h
       WHERE object_id EQ p_objid.
      CHECK sy-subrc EQ 0.
    * Get the Item GUID for the HEADER GUID
      SELECT SINGLE guid
        INTO lv_item_guid
        FROM crmd_orderadm_i
       WHERE header EQ lv_header_guid.
      CHECK sy-subrc EQ 0.
      APPEND lv_header_guid TO lit_header_guid.
      APPEND lv_header_guid TO lit_obj_to_save.
    * Convert System date and time to timestamp
      CONCATENATE sy-datum sy-uzeit INTO lv_timestamp.
    * Setting Contract End Date
      MOVE: lv_item_guid          TO wa_appointment-ref_guid,
            'B'                   TO wa_appointment-ref_kind,
            'CONTEND'             TO wa_appointment-appt_type,
            lv_timestamp          TO wa_appointment-timestamp_from,
            lv_timestamp          TO wa_appointment-timestamp_to,
            sy-zonlo              TO wa_appointment-timezone_to,
            sy-zonlo              TO wa_appointment-timezone_from.
    * Filling the Input Fields for Appointment
      wa_fname-fieldname = lc_appt.
      INSERT wa_fname INTO TABLE lit_fname.
      CLEAR: wa_fname.
      wa_fname-fieldname = lc_from.
      INSERT wa_fname INTO TABLE lit_fname.
      CLEAR: wa_fname.
      wa_fname-fieldname = lc_to.
      INSERT wa_fname INTO TABLE lit_fname.
      CLEAR: wa_fname.
      wa_fname-fieldname = lc_tzone_from.
      INSERT wa_fname INTO TABLE lit_fname.
      CLEAR: wa_fname.
      wa_fname-fieldname = lc_tzone_to.
      INSERT wa_fname INTO TABLE lit_fname.
      CLEAR: wa_fname.
      wa_logical_date_key-appt_type = lc_end.
      MOVE: lv_item_guid          TO wa_input-ref_guid,
            'B'                   TO wa_input-ref_kind,
            lc_obj                TO wa_input-objectname,
            wa_logical_date_key   TO wa_input-logical_key,
            lit_fname             TO wa_input-field_names.
      APPEND wa_input TO lit_input.
      CLEAR: wa_input, wa_logical_date_key.
      APPEND wa_appointment TO lit_appointment.
      CALL FUNCTION 'CRM_ORDER_MAINTAIN'
        EXPORTING
          it_appointment    = lit_appointment
          it_status         = lit_status_comt
        CHANGING
          ct_input_fields   = lit_input
        EXCEPTIONS
          error_occurred    = 1
          document_locked   = 2
          no_change_allowed = 3
          no_authority      = 4
          OTHERS            = 5.
      CHECK sy-subrc EQ 0.
    * Saving the items alone
      CALL FUNCTION 'BAPI_BUSPROCESSND_SAVE'
        TABLES
          objects_to_save = lit_obj_to_save
          saved_objects   = lit_saved_obj
          return          = lit_ret.
      CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'
        EXPORTING
          wait = 'X'.
    <b>Reward points if it helps.</b>
    Regards,
    Amit Mishra

  • Php input date/time as timestamp with timezone

    This is a nightmare!!!!
    I have numerous databases, all of which use timestamp format
    date/times, which are easy to echo according to user timezone
    preferences using putenv ("TZ=".$_SESSION['MM_UTZ']); and echo
    date($_SESSION['MM_UTF'], ($whatever));
    The only problem is, I have only used these for stamping
    "date created" or "date edited" values using Time()
    What I am trying to achieve is:
    User 1 in UK enters date and time, using a javascript
    datetime picker (which normally enters data into field in Y-m-d
    H:i:s) and the php inserts this in timestamp format according to
    timezone.
    User 2 in US looks at date and time and this is echo'd
    according to his timezone.
    Sounds simple...
    I have managed to get so far with the new DateTime object
    which incorporates the user timezone preference ($utz)
    $ndttime= new DateTime($timefield, new DateTimeZone($utz));
    I can then echo this effectively using
    echo $ndttime->format('$utf'); ($utf being user timeformat
    preference)
    My stupid problem is trying to get the $ndtime into the
    database!!!!
    I know this sounds ridiculous but I use the DW insert wizard
    which only uses values from a form and if I echo $ndtime into a
    hidden field, it doesn't process this value in time.
    I attach the current insert script.
    Is this simple?
    Heeeeelp.

    quote:
    Originally posted by:
    AXEmonster
    how does this format when you echo to the page
    echo $ndttime->format('$utf');
    This will echo as a date/time object - i.e. Y-m-d H:i:s, but
    the $utf variable is a session variable with user time format
    preferences, so it could be D, d/m/Y H:i:s or m-d-Y H:i:s
    etc.

  • How to get  generic delta using timestamp field

    Hi All,
    i have created a generic datasource using tables vbrp,vbrk.mara,marc,knvv.. to get the sales data for planning.Here i have document created date and time.So i'm concatinating these 2 date and time fields into timestamp which is of format yyyymmddhhmmss.Finally i'm using this timestamp to extract data .
    So is it the right way to pull the data using timestamp and what is the timezone i need to specify as the servers are in india only.
    or any other way to proceed.
    Thanks
    Rao.

    Hi Rao,
    Delta based on timestamp based on generic datasource only works if any one of the tables contains timestamp field(not time and date fields separately).
    I dont think by combining date & time fields will give you correct results.
    Regarding time zone: Use SAP system time zone.
    Srini

Maybe you are looking for