Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a field with just the year (ie 2013, 2014)
I need to turn the year into the first day of the year:
For instance 2014 would turned to 01/01/2014, 2013 would be turned to 01/01/2013, etc.
Any help?
Steve
YearStart() takes a date as parameter - not a year. The question was how to convert a year - a number approx equal to 2000 - to a date corresponding to Jan 1st (which is a number approximately equal to 40000).
The simplest way to do this is to use MakeDate(), which does exactly this. It returns the correct date, formatted as a date. No need for the Year()-function or for the Date()-function.
HIC
YearStart(Year) as FirstDateofYear
Alternative to yearstart is makedate(Y[,M,D])
makedate(2014) returns 01/01/2014 since Month and Day parameters are omitted,
ie makedate (2014,5) returns 01/05/2014 (as May 1st)
Rgds
Michael
YearStart() will not work. It takes a date (numeric value of around 40000 for today's dates) and not a year as parameter.
MakeDate() is the function you should use.
HIC
File enclosed.
You can use MakeDate function and then use Date function to change into customized data format like below:
=Date(MakeDate(2014),'DD-MM-YYYY')
Thanks,
Angad
You can use YearStart() with Min() and then use Date function to change into customized data format like below:
=Date(Min(YearStart(2014)),'DD-MM-YYYY')
Wouldn’t Year(YearStart(FIELD)) work?
YearStart() takes a date as parameter - not a year. The question was how to convert a year - a number approx equal to 2000 - to a date corresponding to Jan 1st (which is a number approximately equal to 40000).
The simplest way to do this is to use MakeDate(), which does exactly this. It returns the correct date, formatted as a date. No need for the Year()-function or for the Date()-function.
HIC
Here I want date to be displayed as 23 April 2017 for previous year calendar
23rd april 2018 ( today -1) for current year
how to apply using triggers ?