
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First date of the year
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
- « Previous Replies
-
- 1
- 2
- Next Replies »
Accepted Solutions

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
YearStart(Year) as FirstDateofYear


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
File enclosed.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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')

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Wouldn’t Year(YearStart(FIELD)) work?

.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 ?

- « Previous Replies
-
- 1
- 2
- Next Replies »