Jump to content
We've recently updated our Privacy Statement, available here ×

[iReport substring] How to get last 2 digit of the year?


chuonchuonot102
Go to solution Solved by luked,

Recommended Posts

Hi everyone,

Could you please help me following issue?

I have a date which has format dd/MM/yyyy.

I'd like to get 2 last digit of the year.

For example: input: 04/08/2021 => output: 21

I've tried 2 options as below but it still show error as attached screenshot.

Not that: net.myDomain.tools.Ft.formatDate($F{signDate},"dd/MM/yyyy") is correct method that using in my project.

net.myDomain.tools.Ft.formatDate($F{signDate},"dd/MM/yyyy")).toString().subStr(8,9)

net.myDomain.tools.Ft.formatDate($F{signDate},"dd/MM/yyyy")).toString().subString(8,9)

Do you have any idea?

Thanks!

Phuc

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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...