Katie Sikorski Posted January 22, 2021 Share Posted January 22, 2021 I am Sorry but I am new to Spotfire and trying to learn. I need to take a mm/dd/yyyy and convert it to just m/yyyy. I am not sure how to create the expression in the DateAdd or DateDiff Expression. Can someone please help. See example 1/31/2020 1/2020 2/28/2020 2/2020 3/31/2020 3/2020 4/30/2020 4/2020 Thanks, Link to comment Share on other sites More sharing options...
Kirsten Smith (she/her) Posted January 22, 2021 Share Posted January 22, 2021 Try this expression: Concatenate(String(Integer(Month([Column 1]))),"/",Year([Column 1])) Link to comment Share on other sites More sharing options...
Fabian Duerr Posted January 24, 2021 Share Posted January 24, 2021 This approach will change the data type of the new column to a string. If you only want to represent your date column in the way "month/year" go to the column properties and use the formatting option for your column. Link to comment Share on other sites More sharing options...
Katie Sikorski Posted January 25, 2021 Author Share Posted January 25, 2021 Thank you so much that worked! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now