Simplicty and flexibility!


Problems with getting the correct year from year()


Started by Dave C
Search
You will need to Sign In to be able to add or comment on the forum!

Problems with getting the correct year from year()

Hi silly quick question. I want the year from a date field '15' at the moment it is giving me 20 as in 2015


Written by Dave C 15/08/15 at 09:30:48 Dataease [{8}]FIVE

Re:Problems with getting the correct year from year()

lastc(year(date),2)

Year() return a 4 digit year i.e. 2015 and as all return values are treated as text in conversion that will be read from left to right when you convert it to two digits.

So if you only want the last to digits you need to use the string function LastC() to cut them out.


Written by DataEase 15/08/15 at 09:35:10 Dataease [{8}]FIVE
DG3_ForumList