Test Data Manager

 View Only
  • 1.  How do I create a date function for masking Date of services within same month

    Posted Sep 10, 2019 07:08 PM

    In order for our application to function properly after masking the data, the date of service must remain within the month original date would be. 

    How can I accomplish the following: 
    Use DoS +15 days if day part of DOS < 15
    else if DOS day part > 15, use DOS -15 days. 




  • 2.  RE: How do I create a date function for masking Date of services within same month
    Best Answer

    Posted Sep 11, 2019 09:30 AM
    Use HASDOB, there is already a function for this:
    https://docops.ca.com/ca-test-data-manager/4-8/en/reference/masking-functions-and-parameters#MaskingFunctionsandParameters-HASHDOBHASHDOB


  • 3.  RE: How do I create a date function for masking Date of services within same month

    Posted Oct 01, 2019 07:33 AM
    I assume the HASHDOB function date is not always within the same month. If you want to stay in the same month then I would use a SQLFUNCTION. 

    dateadd(d, round(datediff(d, dateadd(day, 1, eomonth(DoS, -1)), eomonth (DoS )) * rand(checksum(newid())), 0), dateadd(second,checksum(newid())%48000, DoS ))


  • 4.  RE: How do I create a date function for masking Date of services within same month

    Posted Oct 01, 2019 08:20 AM

    Use HashDays function, it will change the date, but within the same month.

     

    Thanks and kind regards,

     

    Anthem, Inc.

    Jaimini Bhatt, Test Data Management Lead, EDA

    108 Leigus Rd, Wallingford, Connecticut 06492

    O: (860) 677-2719 | M: (860) 372-2501

    jaimini.bhatt@anthem.com

    Tag:

    For planning purpose note:

     


    CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is
    for the sole use of the intended recipient(s) and may contain confidential
    and privileged information or may otherwise be protected by law. Any
    unauthorized review, use, disclosure or distribution is prohibited. If you
    are not the intended recipient, please contact the sender by reply e-mail
    and destroy all copies of the original message and any attachment thereto.