Introducing the all-new TIBCO Community site!

For current users, please click "Sign In" to reset your password and access the enhanced features. If you're a first-time visitor, we extend a warm welcome—click "Sign Up" to become a part of the TIBCO Community!

If you're seeking alternative community sites, explore ibi, Jaspersoft, and Spotfire.

Jump to content

change format date


SAMUT Fabrice

Recommended Posts

Hi there,

I've a got column named Month in this format : "september-2020" and I want to switch it it like this : "2020-M09"

Could you please tell me how to do that,please

 

Also, is it possible to switchthe column Month in a week column with this format : W1020 for week 10 of the year 2020

 

Thank you

Link to comment
Share on other sites

  • 2 weeks later...

Since this a specific non-standard date format you can achieve the desired output by using a combination of certain functions.

1. First you will need to convert you date to dateTime format.

2. Then to get specific part of the date out you can use dateTime functions.

Ex. week([DateTime]) - returns the week number.

3. Lastly using string functions to get your desired format.

'W10' - > concat('W', string(week([DateTime]))

Hope this helps!

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...