Forum Discussion
How to created calculated Column
Kyle_Johnston Follow below steps:
1. Create a column (say START DATE/TIME) with column type 'Date and Time'.
2. Now I want to convert START DATE/TIME column to datatype 'string'. So, create a new column with type CALCULATED.
3. In 'Additional Column Settings', use the formula =TEXT([Start Date/Time],"DD/MM/YYYY hh:mm") and select the data type returned as SINGLE LINE OF TEXT (syntax: =TEXT([Column_Name],"DD/MM/YYYY hh:mm")). This syntax will display the time in 24 hour format.
4. Click OK.
Now, this field will hold the given data/time input in string format. You can hide this column from users and can apply filtering/sorting to display data.
Hope this helps!
It worked for me.
Last Edit: 12/30/2019 2:01 PM CST
- Kyle_JohnstonDec 30, 2019Copper Contributor
I've done that several times, i'm so confused.
You can see i'm creating a column named dateString. I've selected calculated. the formula i am using is "=[WE Date]" and im returning a single line of text. I press okay and sharepoint gives me an error. It does not create the column.
- Kyle_JohnstonDec 30, 2019Copper Contributor
ellan1537 I just realized, I think It's because i have 37,000 items in this sharepoint list and therefore exceeds the list view threshold.... but i don't ever actually VIEW this list?? i use it as a data source for powerapps.
- ellan1537Dec 30, 2019Iron ContributorTry this syntax. It worked for me.
=TEXT([Column_Name],"DD/MM/YYYY hh:mm")
Eg: =TEXT([Start Date/Time],"DD/MM/YYYY hh:mm")
This syntax will display the time in 24 hour format.