Last post 01-13-2015, 7:09 AM by jmills. 2 replies.
Sort Posts: Previous Next
  • Dates...
    Posted: 01-12-2015, 8:33 AM

    I am looking to have a date set in my workflow as a variable and then also be able to reference a date 14 days past that date. I am running into the following issues:


    When I have the user use the datepicker (calendar) this is what I get back as a variable/output


    Is that what I should be expecting? If so how can I get a usable date from that and a date 14 days in the future?

    What I am doing is disabling Data Aging on a Client Group and I want to set the "Enable After" for two weeks later.

    -J. Mills
    Systems Engineer (Storage & Backup)
    CommVault Certified Master

  • Re: Dates...
    Posted: 01-12-2015, 5:37 PM

    The workflow stores these dates as java Calendar objects:


    The calendar object has an add method in it for adding days to the inputted date.

    You can format date output string using SimpleDateFormat:



    Calendar cal = xpath:{/workflow/inputs/myInputtedDate};
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    String nowStr= sdf.format(cal.getTime());
    cal.add(Calendar.DATE,  14);
    String futureStr = sdf.format(cal.getTime());

    Let me know if you need any help with getting these values into the activity that is doing the data aging manipulation activity.


  • Re: Dates...
    Posted: 01-13-2015, 7:09 AM

    I guess that's a bit beyond me right now. I tried to implement it as a script step but I'm just getting an error. I did however figure out a way to do it against the CommServeDB by running this Query

    Select GETDATE() as 'Today',DATEADD (DAY,14, GETDATE()) as EndDate;

    The response is in a format that I can use it directly in the XML for the the data aging setup as well. It doesn't allow me to select a date, but for this workflow my main goal was to set a date 14 days our from when the workflow was run.

    -J. Mills
    Systems Engineer (Storage & Backup)
    CommVault Certified Master

The content of the forums, threads and posts reflects the thoughts and opinions of each author, and does not represent the thoughts, opinions, plans or strategies of Commvault Systems, Inc. ("Commvault") and Commvault undertakes no obligation to update, correct or modify any statements made in this forum. Any and all third party links, statements, comments, or feedback posted to, or otherwise provided by this forum, thread or post are not affiliated with, nor endorsed by, Commvault.
Commvault, Commvault and logo, the “CV” logo, Commvault Systems, Solving Forward, SIM, Singular Information Management, Simpana, Commvault Galaxy, Unified Data Management, QiNetix, Quick Recovery, QR, CommNet, GridStor, Vault Tracker, InnerVault, QuickSnap, QSnap, Recovery Director, CommServe, CommCell, SnapProtect, ROMS, and CommValue, are trademarks or registered trademarks of Commvault Systems, Inc. All other third party brands, products, service names, trademarks, or registered service marks are the property of and used to identify the products or services of their respective owners. All specifications are subject to change without notice.
Copyright © 2019 Commvault | All Rights Reserved. | Legal | Privacy Policy