I have a date AND time field from SharePoint List Item.
I want to apply a custom format to it to shorten it.
So instead of "March 26th, 2020 16:25 PM" I would want "3/26 @4:25 PM"
Solved! Go to Solution.
Ah, I see, you appear to be mixing Date & DateTime data types, hence the error. It's like mixing Numbers & Text. My guess is that 'Start Date' is a Date ONLY field and 'Next Steps Date' is a Date & Time field. Is this correct?
When I use a similar code structure on my dataset I get the following:
(Notes: my code checks if ThisItem = "DailyPOB", if it is it gets the Date ONLY column, if not the Date & Time column. See the 3rd record has the Year 2001 (in red), same as yours)
The way I got it to work for me (above the red text), was to have two labels ie one for the Date ONLY field and one for the Date & Time field. These labels sit in the same location as each other ie one on top of the other.
Then, I set the Visible properties of each to:
// date ONLY field Visible property If(ThisItem.DocumentType="DailyPOB",true,false) // Date & Time field Visible property If(ThisItem.DocumentType="DailyPOB",false,true)
Just replace my logic for yours.
The Text properties of these labels are ThisItem.'Date ONLY field' and ThisItem.'Date & Time Field' respectively.
Not sure if this is related but this is no longer working today, was working yesterday:
There's a comma at the end of your formula, is your Text() formula part of an If() statement? Also, is this in a gallery or a Form? If a Form, what are the relevant properties of the DataCard?
For you three decimal places, try 000 instead of ##0.
Can you share it? it maybe relevant. Seeing as the dates are mismatching I'd say the If() isn't making it to this statement.
To test this theory, try putting a label in your gallery with the above code only.
When I change, just this piece of the If, it changes the format. So I think that is happening correctly... but full is:
If( ThisItem.'Next Steps' = "START", ThisItem.'Start Date', If( ThisItem.'Next Steps' = "Phone Screen" || ThisItem.'Next Steps' = "Interview" || ThisItem.'Next Steps' = "Final Interview", ThisItem.'Next Steps Date', "" ) )
This displays the full date and time.
When I change just the line I've shown in the clips, it changes to 2001.
Check out these cool Power Apps & vote on your favorite!
Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)
Check out whats happening in Power Apps
FIll out a quick form to claim your community user group member badge today!