Converting text to date via formula
Good afternoon.
I have created a sheet with a form to capture reservation details for a live performance. There are 4 performance date options and form users identify their 1st-4th choices. Once received, they are assigned a date and the cell in the appropriate "Confirmed" column is marked YES. There are 4 "Confirmed" columns, one for each potential performance date.
The formula below is working just fine. However, the text (eg. 04.25/18) is not being recognized as a DATE, so I cannot see the confirmed attendees in calendar view. The text (eg. 04/25/18) is coming through as simply TEXT. I've tried adding another column and somehow converting the TEXT to a DATE in that column and it still doesn't work.
=IF([Tu24 Confirmed]23 = "YES", "04/24/18", IF([W25 Confirmed]23 = "YES", "04/25/18", IF([Th26 Confirmed]23 = "YES", "04/26/18", IF([Fr27 Confirmed]23 = "YES", "04/27/18"))))
Is there anything that I can do short of manually entering a confirmed date for each row?
Thanks in advance for your help!
Comments
-
Shaine Greenwood Employee
Hello,
Use the DATE function in these cases:https://help.smartsheet.com/function/date
Here's an example based on the formula that you provided:
=IF([Tu24 Confirmed]23 = "YES", DATE(2018,4,24), IF([W25 Confirmed]23 = "YES", DATE(2018,4,25), IF([Th26 Confirmed]23 = "YES", DATE(2018,4,26), IF([Fr27 Confirmed]23 = "YES", DATE(2018,4,27)))))
In Smartsheet formulas, quotes will only format values as text, even when you put quotes around something that looks like a date or number.
-
kym4639 ✭
So glad to see something simple to solve this! Thanks a bunch!
-
smantics ✭
Hi! on a slightly similar note- I'm trying track birthdays of a large group. Since people do not want to put in the year they were born, the format they are entering into the text column is something like: "8/7"
I'd like to put this into a calendar and can concatenate the 8/7 with "/18" resulting in "8/7/18"... but not sure how to convert this into an actual date to be shown on a calendar to track.
想法吗?有办法把它转换成我们吗eable calendar date?
Help Article Resources
Categories
Check out theFormula Handbook template!
Try this:<\/p>
=IF(ISDATE([Event Date]@row), IF(AND([Event Date]@row > TODAY(), [Event Date]@row <= TODAY(30)), \"Less than 30 days from today\", \"More than 30 days from today\"), \"//www.santa-greenland.com/community/discussion/20436/\")<\/p>"}]}},"status":{"statusID":3,"name":"Accepted","state":"closed","recordType":"discussion","recordSubType":"question"},"bookmarked":false,"unread":false,"category":{"categoryID":322,"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions","allowedDiscussionTypes":[]},"reactions":[{"tagID":3,"urlcode":"Promote","name":"Promote","class":"Positive","hasReacted":false,"reactionValue":5,"count":0},{"tagID":5,"urlcode":"Insightful","name":"Insightful","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":11,"urlcode":"Up","name":"Vote Up","class":"Positive","hasReacted":false,"reactionValue":1,"count":0},{"tagID":13,"urlcode":"Awesome","name":"Awesome","class":"Positive","hasReacted":false,"reactionValue":1,"count":0}],"tags":[]},{"discussionID":108267,"type":"question","name":"Combining IF Formula for Blank\/ Not Blank Cells","excerpt":"I want to create a formula that provides the below statuses: -Complete: Based on \"Collected Date\" not null -Incomplete: Based on \"Collected Date\" null and \"Antcipated Collected Date\" null -Pending: Based on \"Anticipated Collcted Date\" not null and \"Collected Date\" null Below is what I have, but it's unparseable:…","snippet":"I want to create a formula that provides the below statuses: -Complete: Based on \"Collected Date\" not null -Incomplete: Based on \"Collected Date\" null and \"Antcipated Collected…","categoryID":322,"dateInserted":"2023-07-28T17:23:40+00:00","dateUpdated":null,"dateLastComment":"2023-07-28T18:28:47+00:00","insertUserID":164288,"insertUser":{"userID":164288,"name":"brownrobe","url":"https:\/\/community.smartsheet.com\/profile\/brownrobe","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-07-28T18:42:06+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"updateUserID":null,"lastUserID":164288,"lastUser":{"userID":164288,"name":"brownrobe","url":"https:\/\/community.smartsheet.com\/profile\/brownrobe","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-07-28T18:42:06+00:00","banned":0,"punished":0,"private":false,"label":"✭"},"pinned":false,"pinLocation":null,"closed":false,"sink":false,"countComments":2,"countViews":38,"score":null,"hot":3381135147,"url":"https:\/\/community.smartsheet.com\/discussion\/108267\/combining-if-formula-for-blank-not-blank-cells","canonicalUrl":"https:\/\/community.smartsheet.com\/discussion\/108267\/combining-if-formula-for-blank-not-blank-cells","format":"Rich","lastPost":{"discussionID":108267,"commentID":387885,"name":"Re: Combining IF Formula for Blank\/ Not Blank Cells","url":"https:\/\/community.smartsheet.com\/discussion\/comment\/387885#Comment_387885","dateInserted":"2023-07-28T18:28:47+00:00","insertUserID":164288,"insertUser":{"userID":164288,"name":"brownrobe","url":"https:\/\/community.smartsheet.com\/profile\/brownrobe","photoUrl":"https:\/\/us.v-cdn.net\/6031209\/uploads\/defaultavatar\/nWRMFRX6I99I6.jpg","dateLastActive":"2023-07-28T18:42:06+00:00","banned":0,"punished":0,"private":false,"label":"✭"}},"breadcrumbs":[{"name":"Home","url":"https:\/\/community.smartsheet.com\/"},{"name":"Get Help","url":"https:\/\/community.smartsheet.com\/categories\/get-help"},{"name":"Formulas and Functions","url":"https:\/\/community.smartsheet.com\/categories\/formulas-and-functions"}],"groupID":null,"statusID":3,"attributes":{"question":{"status":"accepted","dateAccepted":"2023-07-28T18:30:11+00:00","dateAnswered":"2023-07-28T18:22:11+00:00","acceptedAnswers":[{"commentID":387882,"body":"