Home Data Prep Q&A


Big News: we’ve moved to the DataRobot Community! Please keep your eye out for an email invitation to join us there. Refer to the We've Moved FAQ for a guide on how to use your existing Paxata Community account to login to our new home.

Visit the official Paxata Documentation portal for all of your doc needs.

First day of previous month calculation

I have a date field and I only want to look at the first day of the previous month, how would I obtain that? Would I use a calculation on the date field to get me the first day of the previous month?

Answers

  • Hi @grifc5

    If I understand your question correctly, you have a date column with lets say a value "2020-02-19". When you apply this function you would like the value of "2020-01-01". If that's the expectation, please use the below computed column expression. 
    DATETRUNC(DATEADD(@[email protected] , -1, "months"), "months")
    where became_customer is the name of my date column. 

    Please let me know in case of any further questions. 

    Regards,
    Shyam Ayyar
    Product Manager
Sign In or Register to comment.