I need to convert total date to month only - google-sheets-api

I set up a google forms form for my work where my employees pass information and this information is recorded in a spreadsheet. The information, when recorded, automatically inserts a date and time in the first column of form responses. However, when I enter the code = month (a1), it always returns the answer "1" or "January" and this information does not match the date entered in the column. How do I fix this?

If you are entering '=month(a1)' for every row, then you are always taking the month of the top left cell in the sheet. You would need to adjust the row number for the row you are in.
You could use something like '=month(now())' to ensure you are always getting the month of the current date.

Related

How to create a calculated column with unique values ​for every field

I'm currently facing a problem working with a CV on SAP HANA.
Basically my goal is to create a calculated field on every row, based on the content of another field of the same row.
More specifically, I have a column of dates with the current format (YYYYMMDD) and I have to automatically create an associated field based on current criterias:
the date with the current month and year has to be associated with 0;
every month after the current one, has to be, in order, increased by one (example: for 20220930 I have 0, for 20221030 I have 1, for 20221230 I have 3.. for 20231230 I have 15, this until 600);
if more than one row has the same date, the calculated field has to be the same, that means that, for example, if more than one row has 20221030, I need to have 1 on all of them).
My first idea was to use a rank node, but the outcome is not as I expected.
Attached, there is a screenshot of a data preview of my attempt (just showing the dates and rank_field columns..).
Any advice is welcome, thanks.
Example of data

Trouble with an Access Query searching within a date range

I have a query that searches saved records and creates a report based on the record(s). Some of the fields are searchable either independently or in association with other parts of the saved record (e.g., one could search the ID, location, and/or whether or not police were notified). However, I run into problems when searching by date.
I have fields for the user to input Start Date and End Date of their desired date range. When ONE or NEITHER field are filled, the search pulls up all records AFTER the Start Date, BEFORE the end date, or ALL the records. When BOTH fields are filled, the search pulls up a record where all fields are blank (which does not exist in the table).
Each searchable field uses the same criteria in the Query:
Like Nz([field that you're searching],"*")
But the date range uses a modified version (sorry if it's SUPER clunky):
Like Nz(([Data_Input_Table].[Day_Current])>=[Forms]![Search_Form]![Start_Date_Lookup_text] And ([Data_Input_Table].[Day_Current])<=[Forms]![Search_Form]![End_Date_Lookup_text],"*")
Ideally, I'd like the user to search by NEITHER, ONE, or BOTH Start Date and End Date.
Please help!
You can't use Like on dates. Try this:
[Data_Input_Table].[Day_Current] >= Nz([Forms]![Search_Form]![Start_Date_Lookup_text], [Data_Input_Table].[Day_Current]) And [Data_Input_Table].[Day_Current] <= Nz([Forms]![Search_Form]![End_Date_Lookup_text], [Data_Input_Table].[Day_Current])

Need NetSuite search formula to display employee time records by projects (in rows) and day of week (in columns)

I'm trying to create a NetSuite Time search that emulates the chart style display on an employee's weekly time record, with projects listed in rows and days of the week listed in columns, with totals by day and by project. The goal is to have a search auto filtered by "Last Week" that can be used with a drop down selector filter for employees. I know there are better ways, but this is a very specific demand from someone above who believes the NS time record is a "query" and wants it to act like one.
I'm good with NS searches but know almost next to nothing about coding. I tried some basic sum formulas using CASE WHEN but am having 2 issues:
1) Can't figure out how to get CASE WHEN to sort by the weekday output from DAY of the {date} and subsequently total the hours.
2) Not sure how to total hh:mm formatted time in searches, and can't figure out what the system name of the "Duration (Decimal)" field is.
Just need one line of a sum formula to total time data from one day of the week, and a way to solve the hh:mm issue and I am good to go from there.
CASE WHEN to_char({date}, 'D') LIKE 1 THEN {durationdecimal} ELSE 0 END
SUN = 1, MON = 2, etc.

Look back through a row and find the last time I wrote a particular word

I have a table that I am creating in relation to toolhire and I have many columns for on hire / off hire / days utilised. in the columns next to the on hire and off hire dates, I have it set to write the words ON and OFF when a date is entered into that cell. I want to set up a column at the end of the table which will look back through the row and tell me whether the item is currently ON or OFF by finding whether the last word it finds is ON or OFF.
If a row spans ColumnsA:M say, and contains only blanks, numeric values or ON or OFF then please try, say in ColumnN and for Row2:
=INDEX(A2:M2,MATCH("zzz",A2:M2))

Excel, automatically updating variable in IF statement based on reference cell?

I have a sheet that needs to be updated monthly with a formula that needs to change with the month.
This is the formula: =IF($S3=AI$1,[#July],0)
The check is to make sure my values go into the correct category. After the category is determined correct, I need to take the month's values by referencing the month column in my table.
Question: Is there any way to make it so when I change the month somewhere, I can make the formula essentially move over a column to take the new month's values?
Note: I also have a similar case where instead of taking the month values verbatim, I'm summing the year's values til said month.
So I assume you have a table with column name January to December.
You can do this in at least two ways (I assume your month number is in cell A1)
Explicit: (in case these columns are not in order or adjacent to another)
=CHOOSE(A1,[#January],[#February], ... ,[#December])
Implicit: (if the months are next to each other:
=INDEX(TableName[#[January]:[December]],A1)
Obviously, I'd recommend the second option, if applicable.
If you want to sum from januar to the current month, you can use this little know trick/syntax:
=SUM([#January]:INDEX(TableName[#[January]:[December]],A1))