Select year

Hi guys,

If I want only to display the assessment year instead of full date,how can I do that???

Here I have use input text and local variable with datatype date.


I think just using formatDateTime() method we can show only years. 

FormatDateTime("date value here","yyyy")


How can I use this in my case??

Actually you need this formatting in input field. But according to current functionality it will open calendar for you to choose the date.  So there are 2 options :

1. Either create it as integer field and limit length to 4.

2. Create a drop down of years manually and set here.

Hi Rohan ,

You can use Year() inbuilt function and you need to pass the date in it. It will return year only

Best Regards


Hi Roy ,

I have created a demo application for above issue you have raised .
Please check by below URL and find attached OML file.

Hope this will help you :)

Rahul Jain


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.