I have a couple of queries running in Google Sheets via Supermetrics.
These all have a column with the date ('2020-05-26') and a numeric column Cost ('3450')
Sometimes in rerunning these queries one of the rows does not show a date format, but a date formatted as number, e.g. '43976' for 2020-05-25. I am importing the sheets in Big Query, but when importing the date column as a date format, I get an error whenever there is one row formatted as a number.
I tried using an arrayformula in Google Sheets to overcome the formatting issue there, but that does not work since you cannot import a column with aan array formula in Google sheets.
I tried importing the column as a string, that works. Now however, I need to make sure all rows are recognised as a date. I used the following formula to change the string into a date, but again that one row formatted as '43976' will block the whole query.
How do I convert a string column, with both values formatted as a date "2020-05-25" and values formatted as a number '43976' to a date column? Thanks for your help!
Hereby a screenshot; however, the formatting is overwritten by the supermetrics query that is run daily, so just changing the formatting in the column here won't help (it will fix it for this day, but not going forward) - I've tried that already..
Related
I am scraping a Twitter account and listing the results in a Google Sheets table. The publication date of each tweet is added in a separate column in the format YYYY-MM-DD hh:mm:ss.
In a new worksheet, I want to list all of yesterday's tweets. I tried doing so by the following command:
=FILTER(Worksheet1!A1:B; Worksheet1!B1:B>TODAY()-1)
Unfortunately, the command doesn't work correctly. It copies all the data from Worksheet1 into the new tab. Does anyone have an idea where I made a mistake?
To filter yes'day tweet data from the raw data try:
=FILTER(Worksheet1!A:B,INT(Worksheet1!B:B)=TODAY()-1)
If its still throwing an error I'd double check the date to see if its proper date format compatible for formula based calculations OR text Date!
I am working on a datasheet on Google sheets and I am trying to change values in column (D) to date time format, so I went to Format<number<date time. But only a few values are getting converted and the rest remain the same. Please see below-
Screenshot of column D
The values aligned on right are converted and the left ones aren't. I even tried paint format, trim white spaces but it didnt work. Please suggest a way on how to resolve this error. Also, there are 49623 values in column D.
thank you
Your spreadsheet is set to a locale that uses the mm/dd/yyyy date format, while your data is using the dd/mm/yyyy date format. That means that the dates where the day of the month is less than or equal to 12 will get converted to dates incorrectly, and the rest of the data will remain as text strings.
To make it work, choose File > Settings > Locale and choose a locale that matches your data, then repaste the data to convert it correctly.
The "49623 values" are dateserials that can be converted to dates by formatting them in a date format. See this answer for an explanation of how date and time values work in spreadsheets.
I'm having a google sheet file, that contains several columns. One of these columns is Date. After loading this sheet into google data studio, I found that this field Date is detected as Text. I tried to to cast it manually using GDS but it failed. So I decided to create another field Date_d using parse_date function in GDS, but it fails too.
The weird thing, is the original field Date, when I read it in GDS, it doesn't look in the same sheet format:
Sheet format column values:
When I read it in GDS:
Based on this I tried to use 2 formulas for the new casted fields:
PARSE_DATE("%Y%m%d", Date) and PARSE_DATE("%m/%d/%Y", Date) but both fail to be read by GDS:
The solution was that you should specify the column type as a String in the google sheet.
I am trying to figure out a SUMIF formula that looks for a partial dat/time match and sums a range based on that match. I am using the date data validation in one cell as the criteria, but the range that I am attempting to match it to is formatted differently, so it isn't working. The dates in the criteria range are formatted as "MM/DD/YY HH:MM:SS" and the date in the criteria cell is formatted "MM/DD/YY" because it's selected from the calendar pop up.
Here is the formula I have, and it works if I edit the criteria range values to "MM/DD/YY", but this isn't a practical option for me, as this value is duplicated on multiple sheets in different number formats.
=SUMIFS(Data!G:G,Data!F:F,""&N8&"")
I'm using SUMIFS here instead of SUMIF because I'll be adding multiple criteria once I figure this piece out.
I'm sorry I can't share this sheet as it's for work, but it's fairly straightforward. I am trying here to use a wildcard for cell N8, which contains the date validation, to find the partial date match from F:F Range, and then SUM matching values in G:G range, but when the format contains the time, it doesn't work.
I would appreciate any help or suggestions! Thanks.
If you have true dates, use formula:
=ArrayFormula(SUMIFS(Data!G:G,INT(Data!F:F),N8))
if dates are entered as text, then:
=ArrayFormula(SUMIFS(Data!G:G,LEFT(Data!F:F,10),N8))
in this case months and days must be formatted with leading zero.
Please try the below formula:
=sumifs(Data!G:G,,arrayformula(value(text(Data!F:F,"mm/dd/yy"))),""&N8&"")
I want to get the price of bitcoin on exact date.
The dates are written in Column A and they are updated regularly from a Google form
This is an example of the working formula, but the date in it is written manually (2017-01-31):
=ARRAYFORMULA(IF(ISBLANK($B$2:$B),"",CRYPTOFINANCE("BTC/USD", "price",2017-01-31)))
But when I try to get the dates from Column A, mentioned with $C$2:$C - Google sheets do not understand it
=ARRAYFORMULA(IF(ISBLANK($B$2:$B),"",CRYPTOFINANCE("BTC/USD", "price",$C$2:$C)))
Click here to check The spreadsheet
Thank you in advance!
"Doctor, it hurts when I do this."
In the example spreadsheet you are converting the dates into text for the column C, using the explicit TEXT() function. Then you are wondering why they no longer work as dates?
Stop converting to text.