Welcome to the Smartsheet Forum Archives


The posts in this forum are no longer monitored for accuracy and their content may no longer be current. If there's a discussion here that interests you and you'd like to find (or create) a more current version, please Visit the Current Forums.

How to remove slashes from formula that includes date field?

MetroBOS
MetroBOS
edited 12/09/19 in Archived 2016 Posts

I am using a formula to concatenate several fields, one of which is a date field which contains forward slashes (e.g. 02/09/16).

 

Is it possible to modify the formula so that it removes the slashes from the end result and appears as 020916?

Tags:

Comments

  • Travis
    Travis Employee

    You can use the MONTH() DAY() YEAR() functions to pull out this information individually then concatenate them together.

     

    Here's an example:

     

    =MONTH([Date3]3) + "" + DAY([Date3]3) + "" + YEAR([Date3]3)

     

    Change [Date3]3 to the cell or formula containing the date.

     

    That formula would turn this: 

     

    02/11/16

     

    To this:

     

    2112016

     

    You can then modify this formula if you want this displayed other ways. 

     

    Like this:

     

    =IF(MONTH([Date3]3) < 10, "0" + MONTH([Date3]3) + "" + DAY([Date3]3) + "" + RIGHT(YEAR([Date3]3), 2), MONTH([Date3]3) + "" + DAY([Date3]3) + "" + RIGHT(YEAR([Date3]3), 2))

     

    This would turn this:

     

    02/11/16

     

    Into this:

     

    021116

This discussion has been closed.