Home Data Prep Q&A

Paxata Community Members: Something special in a community experience is coming your way. Stay tuned to this space.
In the meantime, check out the brand new Data Prep for Data Science topic here and the new DataRobot Community.

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?


  • sayyarsayyar Posts: 24 ✭✭
    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. 

    Shyam Ayyar
    Product Manager
Sign In or Register to comment.