Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Get year out of column with different year notations

Im making an applications with different tables with many data. Lets look at his example what causes the trouble (This is just an example, with dummy data to make the problem clear):

ID
892018
902013
902102
902119
902240
912138
912148
912181
922151
922167
922213
922236
932172
932186
932208
932244
932251
932253
20041112
20041312
20052742
20054578
20137643
20134587

Each ID value contains the year of appeal. The problem is that before the year 2000 the ID's contains a year of 2 numbers like 90, 91, 92 etc. How can i get a year column out of these ID's? 

1 Solution

Accepted Solutions
vivientexier
Partner - Creator II
Partner - Creator II

If(Len(ID)=6, 19 & Left(ID, 2), Left(ID, 4)) as Year

View solution in original post

5 Replies
vivientexier
Partner - Creator II
Partner - Creator II

If(Len(ID)=6, 19 & Left(ID, 2), Left(ID, 4)) as Year

Anonymous
Not applicable
Author

That should work!!

Not applicable
Author

Hi

If my understanding is correct last 4 chars are ID then you can use 'Right' function.

Regards

Mallik

Not applicable
Author

It worked, thanks!

Anonymous
Not applicable
Author

Correct !!