Hiya!
I'm doing a query with created >= "2018-10-01 00:00" AND created <= "2018-1-01 00:00", that I potentially will manually change every month.
How do I instead use startOfMonth() and endOfMonth() if I i.e. want to limit the results to August month? startOfMonth(8) I guess will start from the 8. month from now, as I guess it's relative values?
Hello,
You can get 01 August by this one
startOfYear(212d)
m means minutes. There is no shortcut for months.
212d gives you August 1 in the current year. If it does not give you August 1 in the next year (leap year), then you should change the filter. But you will do it only once in 4 years.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If calculating the number of days might be difficult for you. You can mention the month based on your current month.
For Eg: If I say my present month is September and I want the issues from august, you can query the function to be startOfMonth(-1) which denotes the previous month.
The calculation is always from the present month, which means if I have startOfMonth(-2), it means October if my present month in December and startOfMonth(2) would mean the seond month down the line.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the answers. However, I need it of course to be a fixed month. I can't have it tomorrow be a different result, so I have to get away from relative values all together. It would seem that others need this too, so there probably is another way of doing it, if startOfMonth() only takes relative values.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you use startOfYear(212d) it will be always August first of the current year.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah, okay got ya, so I missed the d behind the integer. In that syntax, maybe startOfYear(8m) maybe works?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
August 1 is the 213th day of the year (214th in leap years) in the Gregorian calendar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.