Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to get first and last day in a year
for example i have 10 years i have to get first and last day for every year
Hi @saravanan_ehkn ,
What do you mean by first/last day ?
You want to know which of the week is it ? Like monday,tuesday ... ?
Regards,
Martin
Here is what i did in a tjava just to test :
String annee = "2019"; String first_day_of_the_year = "01/01/".concat(annee); String last_day_of_the_year = "31/12/".concat(annee); //If type date needed Date date1 = new Date(first_day_of_the_year); Date date2 = new Date(last_day_of_the_year);
If your var are Strings, you can do it by concatenating the year with the fixed first and last day of the year.
And if it is date, you can create a date with the string in argument and define the column date format to fit with the format you want.
Regards,
Martin