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.

Extracting a Date from a Text String into a Date Column

Michelle Kohrs
Michelle Kohrs ✭✭
edited 12/09/19 in Archived 2016 Posts

I have data sent from my CRM into Smartsheet. The CRM will only export an appointment date and time together as one cell, formatted as: 2/09/2016 8:00:00 AM. I need the date to be in a separate column for filtering and formatting purposes.

Β 

I've used a MID function to separate the date from the time using this formula: =MID([Appt Date/Time]23, 1, 9).

Β 

How can I convert the text that the above formula extracts into a Date?

Β 

I tried using a Value function with the Mid function to no avail: =VALUE(MID([Appt Date/Time]23, 1, 9)).

Β 

Thanks for any help!

Comments

  • Christian Wells
    Christian Wells ✭✭✭

    Have a look at the 'smartsheet Formula Examples' Template, it has a comprehensive list of formulas.

    Β 

    You could tryΒ theΒ Β Β  DATE FunctionΒ Β  DATE(year, month, day)

    Β 

    =IF(FIND("/", [Appt Date/Time]23) = 2, DATE(VALUE(MID([Appt Date/Time]23, 6, 4)), VALUE(MID([Appt Date/Time]23, 1, 1)), VALUE(MID([Appt Date/Time]23, 3, 2))), DATE(VALUE(MID([Appt Date/Time]23, 7, 4)), VALUE(MID([Appt Date/Time]23, 1, 2)), VALUE(MID([Appt Date/Time]23, 4, 2))))

    Β 

    This formulaΒ  Tests you date for the Day field being 1 or 2 characters long, Then Builds a Date for either option.

    Β 

    Hope this helps

    Β 

    Β 

  • Michelle Kohrs
    Michelle Kohrs ✭✭

    Christian - That works! Thanks for your time. Not sure I would have got there on my own.

  • Peter Smith
    Peter Smith ✭✭
    edited 04/03/17

    Hi, Christian

    Β Can this formula used with lookup formula? Β 

    I have similar case like that.Β 

    Β 

    CRM send the format forΒ 2/09/2016 8:00:00 AM

    However we need year, date and month only. I have another column minus 21 days of column with year, date and month.Β 

    Β 

    We have 1000 clients. That is why we want to use lookup formula for my office managed client and then use formula to get info of meeting /time appointmentΒ 

    Β 

    ThanksΒ 

This discussion has been closed.