Service Virtualization

 View Only
Expand all | Collapse all
  • 1.  Date format

    Posted Dec 06, 2023 04:33 PM

    I need to print a dynamic date in the virtual service response with the month specified in CAPs. I've used the code below, which displays the first letter in capital and the rest in lowercase; any recommendations would be greatly appreciated.

    Function : {{=doDateDeltaFromCurrent("dd-MMM-yyyy HH:mm:ss","-1M");/*14-08-2012 09:01:03*/}}
     
    Outcome : 06-Dec-2023 15:45:58
    Expected results : 06-DEC-2023 15:45:58


  • 2.  RE: Date format

    Broadcom Employee
    Posted Dec 06, 2023 05:51 PM
    Try:

    Function : {{=doDateDeltaFromCurrent("dd-MMM-yyyy
    HH:mm:ss","-1M").toUpperCase();/*14-08-2012 09:01:03*/}}

    Cheers,
    Danny

    --
    This electronic communication and the information and any files transmitted
    with it, or attached to it, are confidential and are intended solely for
    the use of the individual or entity to whom it is addressed and may contain
    information that is confidential, legally privileged, protected by privacy
    laws, or otherwise restricted from disclosure to anyone else. If you are
    not the intended recipient or the person responsible for delivering the
    e-mail to the intended recipient, you are hereby notified that any use,
    copying, distributing, dissemination, forwarding, printing, or copying of
    this e-mail is strictly prohibited. If you received this e-mail in error,
    please return the e-mail to the sender, delete it from your computer, and
    destroy any printed copy of it.




  • 3.  RE: Date format

    Posted Dec 07, 2023 03:58 PM

    Thanks Danny for quick turnaround , I tried the function that your shared but no luck , below is the sample response.

    <AddtlInf> {{=doDateDeltaFromCurrent("dd-MMM-yyyy HH:mm:ss","-1M").toUpperCase();/*14-DEC-2012 09:01:03*/}}</AddtlInf>




  • 4.  RE: Date format
    Best Answer

    Broadcom Employee
    Posted Dec 15, 2023 12:15 PM

    Try this {{="{{=doDateDeltaFromCurrent("dd-MMM-yyyy HH:mm:ss","-1M");/*14-DEC-2012 09:01:03*/}}".toUpperCase() }} 

    or 

    if you also need it to be a property {{reqDate = "{{=doDateDeltaFromCurrent("dd-MMM-yyyy HH:mm:ss","-1M");/*14-DEC-2012 09:01:03*/}}".toUpperCase() }}



    ------------------------------
    Karl M.
    DevOps Capability Specialist
    Broadcom
    ------------------------------



  • 5.  RE: Date format

    Broadcom Employee
    Posted Dec 19, 2023 02:18 AM
    Hi Karl,

    Did you get this suggestion to work on your system?

    When Vikram replied that my original suggestion didn't work I realized that
    we needed this double level of right-hand side bean-shell expression
    execution but I never got it to work.

    I thought it had to do with the fact that the doDateDelta function isn't
    java but a script function.
    But it could also be my environment and/or DevTest version because I don't
    have the issue that Vikram experiences (My months are in uppercase by
    default), hence my question if it works on your system.

    Cheers,

    Danny Saro

    Client Services Consultant

    Broadcom Software


    -------------------------------------------------

    --
    This electronic communication and the information and any files transmitted
    with it, or attached to it, are confidential and are intended solely for
    the use of the individual or entity to whom it is addressed and may contain
    information that is confidential, legally privileged, protected by privacy
    laws, or otherwise restricted from disclosure to anyone else. If you are
    not the intended recipient or the person responsible for delivering the
    e-mail to the intended recipient, you are hereby notified that any use,
    copying, distributing, dissemination, forwarding, printing, or copying of
    this e-mail is strictly prohibited. If you received this e-mail in error,
    please return the e-mail to the sender, delete it from your computer, and
    destroy any printed copy of it.




  • 6.  RE: Date format

    Broadcom Employee
    Posted Dec 19, 2023 08:46 AM
    HI Danny
    I tested Karls suggestion locally. It worked like a charm.

    --
    regards
    Sankar Natarajan

    --
    This electronic communication and the information and any files transmitted
    with it, or attached to it, are confidential and are intended solely for
    the use of the individual or entity to whom it is addressed and may contain
    information that is confidential, legally privileged, protected by privacy
    laws, or otherwise restricted from disclosure to anyone else. If you are
    not the intended recipient or the person responsible for delivering the
    e-mail to the intended recipient, you are hereby notified that any use,
    copying, distributing, dissemination, forwarding, printing, or copying of
    this e-mail is strictly prohibited. If you received this e-mail in error,
    please return the e-mail to the sender, delete it from your computer, and
    destroy any printed copy of it.




  • 7.  RE: Date format

    Broadcom Employee
    Posted Dec 19, 2023 09:25 AM
    Thanks Sankar,

    Ok, good to hear.

    I'm wondering then why not locally on my installation. Can you let me know
    your DevTest version?

    Cheers,

    Danny Saro

    Client Services Consultant

    Broadcom Software


    -------------------------------------------------

    --
    This electronic communication and the information and any files transmitted
    with it, or attached to it, are confidential and are intended solely for
    the use of the individual or entity to whom it is addressed and may contain
    information that is confidential, legally privileged, protected by privacy
    laws, or otherwise restricted from disclosure to anyone else. If you are
    not the intended recipient or the person responsible for delivering the
    e-mail to the intended recipient, you are hereby notified that any use,
    copying, distributing, dissemination, forwarding, printing, or copying of
    this e-mail is strictly prohibited. If you received this e-mail in error,
    please return the e-mail to the sender, delete it from your computer, and
    destroy any printed copy of it.




  • 8.  RE: Date format

    Broadcom Employee
    Posted Dec 19, 2023 10:36 AM
    Worked in 10.7.2 GA and SP4

    *Karl Miller*

    *mobile:* 720.636.4648
    Karl.Miller@broadcom.com

    Upcoming Out of Office: Dec 26 - 29


    On Tue, Dec 19, 2023 at 8:27 AM Danny Saro via Broadcom <mail@broadcom.com>
    wrote:

    > Thanks Sankar, Ok, good to hear. I'm wondering then why not locally on my
    > installation. Can you let me know your DevTest version? Cheers, ... -posted
    > to the "Service Virtualization" community
    > [image: Broadcom] <https: community.broadcom.com="">
    > Service Virtualization
    > <https: community.broadcom.com/enterprisesoftware/communities/community-home/digestviewer?communitykey="94bda077-625b-4914-8ac3-c88a06c2cc23">
    > Post New Message <broadcom-servicevirtualization@connectedcommunity.org>
    > Re: Date format
    > <https: community.broadcom.com/enterprisesoftware/discussion/date-format#bmcee6db2b-2229-4118-8250-e93811627f85="">
    > Reply to Group
    > <broadcom_servicevirtualization_cee6db2b-2229-4118-8250-e93811627f85@connectedcommunity.org?subject=re:+date+format> Reply
    > to Sender
    > <https: community.broadcom.com/enterprisesoftware/communities/all-discussions/postreply?messagekey="cee6db2b-2229-4118-8250-e93811627f85&ListKey=d4484a56-be7e-428f-99d1-26cc0f5a617e&SenderKey=b273cee0-530b-4461-bdff-73a13b2f061e">
    > [image: Danny Saro]
    > <https: community.broadcom.com/network/members/profile?userkey="b273cee0-530b-4461-bdff-73a13b2f061e">
    > Dec 19, 2023 9:25 AM
    > Danny Saro
    > <https: community.broadcom.com/network/members/profile?userkey="b273cee0-530b-4461-bdff-73a13b2f061e">
    > Thanks Sankar,
    >
    > Ok, good to hear.
    >
    > I'm wondering then why not locally on my installation. Can you let me know
    > your DevTest version?
    >
    > Cheers,
    >
    > Danny Saro
    >
    > Client Services Consultant
    >
    > Broadcom Software
    >
    >
    > -------------------------------------------------
    >
    > --
    > This electronic communication and the information and any files
    > transmitted
    > with it, or attached to it, are confidential and are intended solely for
    > the use of the individual or entity to whom it is addressed and may
    > contain
    > information that is confidential, legally privileged, protected by privacy
    > laws, or otherwise restricted from disclosure to anyone else. If you are
    > not the intended recipient or the person responsible for delivering the
    > e-mail to the intended recipient, you are hereby notified that any use,
    > copying, distributing, dissemination, forwarding, printing, or copying of
    > this e-mail is strictly prohibited. If you received this e-mail in error,
    > please return the e-mail to the sender, delete it from your computer, and
    > destroy any printed copy of it.
    >
    > *Reply to Group Online
    > <https: community.broadcom.com/enterprisesoftware/communities/all-discussions/postreply?messagekey="cee6db2b-2229-4118-8250-e93811627f85&ListKey=d4484a56-be7e-428f-99d1-26cc0f5a617e">*
    > *Reply to Group via Email
    > <broadcom_servicevirtualization_cee6db2b-2229-4118-8250-e93811627f85@connectedcommunity.org?subject=re:+date+format>*
    > *View Thread
    > <https: community.broadcom.com/enterprisesoftware/discussion/date-format#bmcee6db2b-2229-4118-8250-e93811627f85="">*
    > *Recommend
    > <https: community.broadcom.com:443/enterprisesoftware/discussion/date-format?messagekey="cee6db2b-2229-4118-8250-e93811627f85&cmd=rate&cmdarg=add#bmcee6db2b-2229-4118-8250-e93811627f85">*
    > *Forward
    > <https: community.broadcom.com/enterprisesoftware/communities/all-discussions/forwardmessages?messagekey="cee6db2b-2229-4118-8250-e93811627f85&ListKey=d4484a56-be7e-428f-99d1-26cc0f5a617e">*
    > *Flag as Inappropriate
    > <https: community.broadcom.com/enterprisesoftware/discussion/date-format?markappropriate="cee6db2b-2229-4118-8250-e93811627f85#bmcee6db2b-2229-4118-8250-e93811627f85">*
    >
    > -------------------------------------------
    > Original Message:
    > Sent: 12/19/2023 8:46:00 AM
    > From: Sankar Natarajan
    > Subject: RE: Date format
    >
    > HI Danny
    > I tested Karls suggestion locally. It worked like a charm.
    >
    > --
    > regards
    > Sankar Natarajan
    >
    > --
    > This electronic communication and the information and any files
    > transmitted
    > with it, or attached to it, are confidential and are intended solely for
    > the use of the individual or entity to whom it is addressed and may
    > contain
    > information that is confidential, legally privileged, protected by privacy
    > laws, or otherwise restricted from disclosure to anyone else. If you are
    > not the intended recipient or the person responsible for delivering the
    > e-mail to the intended recipient, you are hereby notified that any use,
    > copying, distributing, dissemination, forwarding, printing, or copying of
    > this e-mail is strictly prohibited. If you received this e-mail in error,
    > please return the e-mail to the sender, delete it from your computer, and
    > destroy any printed copy of it.
    >
    >
    >
    >
    >
    > You are receiving this notification because you followed the 'Date format'
    > message thread. If you do not wish to follow this, please click here
    > <https: community.broadcom.com/higherlogic/common/unfollow.aspx?userkey="d62b9d2d-95a6-49cf-895a-41a40d4cd234&sKey=KeyRemoved&ItemKey=89e655a9-cd47-4342-b370-018c41081e25">.
    >
    >
    > Update your email preferences
    > <https: community.broadcom.com/go.aspx?c="Preferences§ion=email"> to
    > choose the types of email you receive
    >
    > Unsubscribe from all participation emails
    > <https: community.broadcom.com/higherlogic/egroups/unsubscribe.aspx?userkey="d62b9d2d-95a6-49cf-895a-41a40d4cd234&sKey=KeyRemoved&mClass=Social">
    >

    --
    This electronic communication and the information and any files transmitted
    with it, or attached to it, are confidential and are intended solely for
    the use of the individual or entity to whom it is addressed and may contain
    information that is confidential, legally privileged, protected by privacy
    laws, or otherwise restricted from disclosure to anyone else. If you are
    not the intended recipient or the person responsible for delivering the
    e-mail to the intended recipient, you are hereby notified that any use,
    copying, distributing, dissemination, forwarding, printing, or copying of
    this e-mail is strictly prohibited. If you received this e-mail in error,
    please return the e-mail to the sender, delete it from your computer, and
    destroy any printed copy of it.




  • 9.  RE: Date format

    Broadcom Employee
    Posted Dec 19, 2023 10:36 AM
    That Mar also has a test the VSM id demo-accounts
    *Karl Miller*

    *mobile:* 720.636.4648
    Karl.Miller@broadcom.com

    Upcoming Out of Office: Dec 26 - 29


    On Tue, Dec 19, 2023 at 9:35 AM Karl Miller <karl.miller@broadcom.com>
    wrote:

    > Worked in 10.7.2 GA and SP4
    >
    > *Karl Miller*
    >
    > *mobile:* 720.636.4648
    > Karl.Miller@broadcom.com
    >
    > Upcoming Out of Office: Dec 26 - 29
    >
    >
    > On Tue, Dec 19, 2023 at 8:27 AM Danny Saro via Broadcom <mail@broadcom.com>
    > wrote:
    >
    >> Thanks Sankar, Ok, good to hear. I'm wondering then why not locally on my
    >> installation. Can you let me know your DevTest version? Cheers, ... -posted
    >> to the "Service Virtualization" community
    >> [image: Broadcom] <https: community.broadcom.com="">
    >> Service Virtualization
    >> <https: community.broadcom.com/enterprisesoftware/communities/community-home/digestviewer?communitykey="94bda077-625b-4914-8ac3-c88a06c2cc23">
    >> Post New Message <broadcom-servicevirtualization@connectedcommunity.org>
    >> Re: Date format
    >> <https: community.broadcom.com/enterprisesoftware/discussion/date-format#bmcee6db2b-2229-4118-8250-e93811627f85="">
    >> Reply to Group
    >> <broadcom_servicevirtualization_cee6db2b-2229-4118-8250-e93811627f85@connectedcommunity.org?subject=re:+date+format> Reply
    >> to Sender
    >> <https: community.broadcom.com/enterprisesoftware/communities/all-discussions/postreply?messagekey="cee6db2b-2229-4118-8250-e93811627f85&ListKey=d4484a56-be7e-428f-99d1-26cc0f5a617e&SenderKey=b273cee0-530b-4461-bdff-73a13b2f061e">
    >> [image: Danny Saro]
    >> <https: community.broadcom.com/network/members/profile?userkey="b273cee0-530b-4461-bdff-73a13b2f061e">
    >> Dec 19, 2023 9:25 AM
    >> Danny Saro
    >> <https: community.broadcom.com/network/members/profile?userkey="b273cee0-530b-4461-bdff-73a13b2f061e">
    >> Thanks Sankar,
    >>
    >> Ok, good to hear.
    >>
    >> I'm wondering then why not locally on my installation. Can you let me know
    >> your DevTest version?
    >>
    >> Cheers,
    >>
    >> Danny Saro
    >>
    >> Client Services Consultant
    >>
    >> Broadcom Software
    >>
    >>
    >> -------------------------------------------------
    >>
    >> --
    >> This electronic communication and the information and any files
    >> transmitted
    >> with it, or attached to it, are confidential and are intended solely for
    >> the use of the individual or entity to whom it is addressed and may
    >> contain
    >> information that is confidential, legally privileged, protected by
    >> privacy
    >> laws, or otherwise restricted from disclosure to anyone else. If you are
    >> not the intended recipient or the person responsible for delivering the
    >> e-mail to the intended recipient, you are hereby notified that any use,
    >> copying, distributing, dissemination, forwarding, printing, or copying of
    >> this e-mail is strictly prohibited. If you received this e-mail in error,
    >> please return the e-mail to the sender, delete it from your computer, and
    >> destroy any printed copy of it.
    >>
    >> *Reply to Group Online
    >> <https: community.broadcom.com/enterprisesoftware/communities/all-discussions/postreply?messagekey="cee6db2b-2229-4118-8250-e93811627f85&ListKey=d4484a56-be7e-428f-99d1-26cc0f5a617e">*
    >> *Reply to Group via Email
    >> <broadcom_servicevirtualization_cee6db2b-2229-4118-8250-e93811627f85@connectedcommunity.org?subject=re:+date+format>*
    >> *View Thread
    >> <https: community.broadcom.com/enterprisesoftware/discussion/date-format#bmcee6db2b-2229-4118-8250-e93811627f85="">*
    >> *Recommend
    >> <https: community.broadcom.com:443/enterprisesoftware/discussion/date-format?messagekey="cee6db2b-2229-4118-8250-e93811627f85&cmd=rate&cmdarg=add#bmcee6db2b-2229-4118-8250-e93811627f85">*
    >> *Forward
    >> <https: community.broadcom.com/enterprisesoftware/communities/all-discussions/forwardmessages?messagekey="cee6db2b-2229-4118-8250-e93811627f85&ListKey=d4484a56-be7e-428f-99d1-26cc0f5a617e">*
    >> *Flag as Inappropriate
    >> <https: community.broadcom.com/enterprisesoftware/discussion/date-format?markappropriate="cee6db2b-2229-4118-8250-e93811627f85#bmcee6db2b-2229-4118-8250-e93811627f85">*
    >>
    >> -------------------------------------------
    >> Original Message:
    >> Sent: 12/19/2023 8:46:00 AM
    >> From: Sankar Natarajan
    >> Subject: RE: Date format
    >>
    >> HI Danny
    >> I tested Karls suggestion locally. It worked like a charm.
    >>
    >> --
    >> regards
    >> Sankar Natarajan
    >>
    >> --
    >> This electronic communication and the information and any files
    >> transmitted
    >> with it, or attached to it, are confidential and are intended solely for
    >> the use of the individual or entity to whom it is addressed and may
    >> contain
    >> information that is confidential, legally privileged, protected by
    >> privacy
    >> laws, or otherwise restricted from disclosure to anyone else. If you are
    >> not the intended recipient or the person responsible for delivering the
    >> e-mail to the intended recipient, you are hereby notified that any use,
    >> copying, distributing, dissemination, forwarding, printing, or copying of
    >> this e-mail is strictly prohibited. If you received this e-mail in error,
    >> please return the e-mail to the sender, delete it from your computer, and
    >> destroy any printed copy of it.
    >>
    >>
    >>
    >>
    >>
    >> You are receiving this notification because you followed the 'Date
    >> format' message thread. If you do not wish to follow this, please click
    >> here
    >> <https: community.broadcom.com/higherlogic/common/unfollow.aspx?userkey="d62b9d2d-95a6-49cf-895a-41a40d4cd234&sKey=KeyRemoved&ItemKey=89e655a9-cd47-4342-b370-018c41081e25">.
    >>
    >>
    >> Update your email preferences
    >> <https: community.broadcom.com/go.aspx?c="Preferences§ion=email"> to
    >> choose the types of email you receive
    >>
    >> Unsubscribe from all participation emails
    >> <https: community.broadcom.com/higherlogic/egroups/unsubscribe.aspx?userkey="d62b9d2d-95a6-49cf-895a-41a40d4cd234&sKey=KeyRemoved&mClass=Social">
    >>
    >

    --
    This electronic communication and the information and any files transmitted
    with it, or attached to it, are confidential and are intended solely for
    the use of the individual or entity to whom it is addressed and may contain
    information that is confidential, legally privileged, protected by privacy
    laws, or otherwise restricted from disclosure to anyone else. If you are
    not the intended recipient or the person responsible for delivering the
    e-mail to the intended recipient, you are hereby notified that any use,
    copying, distributing, dissemination, forwarding, printing, or copying of
    this e-mail is strictly prohibited. If you received this e-mail in error,
    please return the e-mail to the sender, delete it from your computer, and
    destroy any printed copy of it.




  • 10.  RE: Date format

    Posted Jan 08, 2024 03:42 PM

    Thanks Karl for the suggestion, this worked perfectly fine.

    Request : {{="{{=doDateDeltaFromCurrent("dd-MMM-yyyy HH:mm:ss","-1M");/*14-DEC-2012 09:01:03*/}}".toUpperCase() }} 

    Response : 08-JAN-2024 15:39:59