How can I make a google sheets query for dates that fall in "this week" - date

I'm trying to put a query in one google sheet tab that pulls in data from another tab (Called Confirmed Shoots), based on one "date" column in the Confirmed Shoots tab. I want to pull in anything from the current week, probably taken from the week number (WEEKNUM).
I have a similar formula working in another tab where I'm pulling in everything scheduled for tomorrow, which is:
=query('Confirmed Shoots'!A1:Y,"Select G,J,I,H,C,E,F,K,L,N,D Where G=date"""&text(TODAY()+1,"yyyy-mm-dd")&""" ")
I also found a way to pull "this week" from a date with this IF formula-
=IF(WEEKNUM(G2)=WEEKNUM(NOW()),"Yes","")
I'm struggling with the syntax, trying to combine the two. I want it to be something like:
=query('Confirmed Shoots'!A1:Y,"Select G,J,I,H,C,E,F,K,L,N,D Where (WEEKNUM(G2)=WEEKNUM(NOW()),"yyyy-mm-dd")&""" ")")
or
=query('Confirmed Shoots'!A1:Y,"Select G,J,I,H,C,E,F,K,L,N,D Where (WEEKNUM(G2)=WEEKNUM(NOW())
Both of these are giving me errors though. Does anyone know how to do this? Thanks!

Try:
=FILTER(QUERY('Confirmed Shoots'!A1:Y,"Select G,J,I,H,C,E,F,K,L,N,D"), WEEKNUM('Confirmed Shoots'!G1:G)=WEEKNUM(NOW()))

Related

Google spreadsheet month name (MMMM) without declension

I want to display formatted month name in the basic form (nominative) as a label. In Czech language (and several next Slavic languages) we use declension. So if I use =TEXT(NOW();"MMMM") the cell shows month name in genetive instead of nominative (i.e. srpna instead of srpen).
Q: How to format the date in the nominative? The acceptable solution will offer some native way how to solve it but not:
manipulating with strings (month names are too complex)
having some another list with month names
calling own formula (Google script)
Maybe there is no native way how to solve this and it will be implemented in the future, so Google Script seems to be the easiest hotfix for now. And because I'm expecting many answers with the script, I'm putting the one here but this question is not about the javascript/google-script.
function monthName(date) {
var months = ["Leden","Únor","Březen","Duben","Květen", "Červen","Červenec","Srpen","Září","Říjen","Listopad","Prosinec"];
return months[date.getMonth()];
}

How do I search GitHub issues "created in the last seven days"?

We'd like to list all GitHub issues created in the last seven (or, n) days. This is a relative time window.
We don't want to use a specific date, because we'd like to create a link that is always correct (so we can link to the report of recent issues).
Thanks!
According to https://help.github.com/articles/searching-issues/#search-based-on-when-an-issue-or-pull-request-was-created-or-last-updated
created:2016-12-01..2016-12-08
Will output issue created during these 7 days.
You could create a bookmarklet, like I have, to for example, show your merged PRs last 7 days within a repo. Here's my bookmarklet:
javascript:document.location.href%3D%60https://github.com/calcom/cal.com/pulls%3Fq%3Dis%253Apr%2Bauthor%253Aleog%2Bis%253Aclosed%2Bmerged%253A%253E%24%7Bnew Date((new Date).setDate((new Date).getDate()-7)).toISOString().split("T")%5B0%5D%7D%60%3B

In Jaspersoft Studio, how do I use the DATEFORMAT() function?

Here's a screenshot:
Here's a screenshot http://www.coletrumbo.com/wp-content/uploads/2015/05/dateformat-1024x575.png
I'm trying to turn the current date into July 1st of the current year using DATEFORMAT(). I learned how to do that in MySQL from this question, and I hoped it would work similarly in Jaspersoft Studio- turns out date_format( curdate(), '%Y-07-01' ) doesn't translate into
DATEFORMAT( TODAY(), '%Y-07-01' ) or DATEFORMAT( TODAY(), YY/07/01 ). Neither worked.
I could keep trying to get creative and hopefully find something that works, but I'd rather actually understand how to use DATEFORMAT().
I checked the Jaspersoft Studio User Guide, but it's not there. From the prompts on the screen, it makes a lot of sense, but I just can't figure out the "format pattern" that I'm allowed to apply, or even how to correctly write any format pattern at all. Also, this conveniently named question, DateFormat Pattern, didn't actually help at all. And community.jaspersoft.com/answers is kind of a joke in my opinion. When I checked it a couple days ago, it was filled with spam linking to live hockey games.
Thanks in advance. I'm sure this is a beginner level question, so I feel dumb asking it, and I feel like I'm wasting other people's space and time with it because I should already know. So I really appreciate your willingness to care.
I am using the following to get the todays date in a danish format
"Dato: "+new java.text.SimpleDateFormat("dd MMMM yyyy",new
Locale("da", "DK")).format(new Date())
you can find the source code for the DateTime functions directly in JR repository: https://sourceforge.net/p/jasperreports/code/ci/master/tree/jasperreports/demo/samples/functions/src/net/sf/jasperreports/functions/standard/DateTimeFunctions.java
As you can see the code is fairly simple and relies on the Joda Time library.
Therefore the second parameter you are trying to enter is a String, while the first one is a Date object.
Indeed something that could work for you is an expression like this DATEFORMAT(TODAY(), "07-01-YYYY")
Regards,
Massimo.

I need the complete list of date format in meteor autoform

I am trying to bring up a date format of "Monday, February 2,2015" in meteor autoform, from this code
moment.utc("2015-02-02").format("LL")
I would like to have a list like in php.date function shows the full date format.
I believe each one of us will find few and post here so that we get the complete list. I googled and I never got the list.
I'm not sure I fully understand your question but this might help.
http://momentjs.com/

Change article_custom so that 'past' doesn't exclude an event on the current date

I'm using textpattern and trying to display a list of upcoming events. I'm using article_custom.
<txp:article_custom
form="eventshome"
limit="4"
time="future"
sort="Posted
section="events" />
The issue I have is that this is supposed to show events coming up but using 'future' means that when an event is on the current date it's not showing (it's not future anymore). Both 'past' and 'future' time options seem to exclude the current date. That means people coming on the site don't see an event on that day which is a bit of an issue.
I've had a quick look around the code but can't seem to work out how to change the SQL statement so that future includes the current date.
Any help appreciated.
Its a bit oldie, but since i've just fixed the same issue, i thought i could provide my very simple soution to this matter.
What i did was simply set article date and time to its date and 25:59:59 time, so its visible all day on current day, but disappears immeadetly when day changes.
Since i didn't want to type those times always again and again, i run small javascript on article page which sets those automaticly to fields.
You can try plugin smd_calendar - http://stefdawson.com/sw/plugins/smd_calendar
it supports a lot of methods to display upcomming and past events.