Does fusion tables support inserts with times? - google-fusion-tables

I'm using the query API to insert a datetime with this format: '2013-06-25T21:57:25.033-07:00'
But in the table it only shows up with date-precision, the time is dropped. How can I include the time?

You need to configure the column to the correct date format on the Fusion Table in question.
Open Google Fusion Table Interface > Change Column > Select Date/Time Column > Select Appropriate Date Format: http://i.stack.imgur.com/OUz4N.png

Related

How to Automatically convert a String YYYY|MM Column to a Date Column YYYY/MM on Google Sheet?

I am pulling data with a Plugin called Supermetrics from Adobe Analytics to Google Sheet.
The Date column is pulled as String and I want to create automatically another column that is reading and converting this column to a Date Format
Input
Year & month First touch channel Visits
2018|12 Natural Search 12345
2019|01 Natural Search 56789
2019|02 Natural Search 23456
2019|03 Natural Search 78912
2019|04 Natural Search 34567
Expected Output
Year & month First touch channel Visits Year & month_dt
2018|12 Natural Search 12345 2018|12
2019|01 Natural Search 56789 2019|01
2019|02 Natural Search 23456 2019|02
2019|03 Natural Search 78912 2019|03
2019|04 Natural Search 34567 2019|04
I don't need to do manually by clicking on the menu -> Format->Date
I need a way to do automatically and possibly without conflicts with the plugin, because the data are going to be refreshed daily.
You can use this array formula in the table header
={"Year & month_dt";ArrayFormula(if(A2:A<>"", DATE(LEFT(A2:A,4),RIGHT(A2:A,2),1),))}
in order to convert the received dates to your desired format - apply the YYYY|MM date format once for the whole column

Match Value based on corresponding dates

I have the spreadsheet attached.
I'd like to find Client No from lookup sheet based on the date provided in the live sheet.
The same client can appear with a different client number, so i need to lookup the name and date (from live sheet) and find the corresponding client number in the lookup sheet where the date from live sheet falls between the 2 dates on the lookup sheet.
I hope this makes sense.
Any help appreciated.
Thank you
This might do what you're looking for.
=IFERROR(
QUERY(SORT(FILTER(Lookup!A$2:D,Lookup!C$2:C=B2,Lookup!A$2:A<=A2),1,0),
"SELECT * WHERE COL4 >= DATE '"&TEXT(A2,"YYYY-MM-DD")&"' LIMIT 1",0),
QUERY(SORT(FILTER(Lookup!A$2:D,Lookup!C$2:C=B2,Lookup!A$2:A<=A2),1,0),
"SELECT * LIMIT 1",0) )
I've added a tab Live-GK to your sheet, with this formula in C2. It has to be dragged down. There may be another approach where it can be done as an arrayformula, but I haven't figured that out.
Note that on my tab, I'm doing the lookups from Lookup-GK, since I could add more test data there. The above formula can be used as is, pasted into cell C2 in your Live tab.
Note that for debugging purposes, column H of my tab returns all of the columns, not just the client #, so the start and end dates can be verified.
Let me know if this helps you.
Explanation:
The inner filter selects all rows from the Lookup tab where:
i) the client name (column C in Lookup) matches the client name in column B (of Live), and,
ii) the start date (column A in Lookup) is less than or equal the client date in Live.
These records are sorted in descending date order.
Then the query selects the first record where the end date (column D in Lookup) is greater than the client date in Live.
If the Lookup record has no end date, this gives an error (empty query result) so IFERROR, a second query is run, but without the filtering by end date, selecting the one record with no end date, but an appropriate start date.
These seemed to work with the few test records I used. If there is a duplication of client dates, the first client # is returned. See client #1 and #7 in my test data. Some more error handling might be necessary if your client records might have overlapping date ranges, as CalculusWhiz asked.

how to get latest timestamp data

I am new to influx db, please help me with query?
I have below like data in influx where same Name data (A1, A2) can be available for multiple time.
I need only latest time stamp data (row 3,4,5) if same data is available in multiple time stamp and the new data (A3). Is such query available in influx?
this query only gives one record,
SELECT time, Name, value FROM "data" order by time desc limit 1
You can use the InfluxDB's last function to achieve this.
SELECT LAST("value") FROM AssetAssetType GROUP BY "Name"

How to change MM/DD/YYYY to DD/MM/YYYY

I have imported a CSV file to the spreadsheet that includes columns with Dates and timestamp (Columns D,E,K,L) and I'm currently facing 2 problems with these columns.
Some rows are formatted as text/string and I can't seem to change it to date format. I tried manually changing it via format>number>datetime but it remains the same.
the format of the date is being read incorrectly by spreadsheet. For example, 5/11/2018 is being read as May 11, 2019 but if you try to review the spreadsheet, it should be read as November 5, 2018. I tried playing with the format and spreadsheet settings to no avail.
Spreadsheet Sample
I'd appreciate any inputs.
UPDATE
For Column D & E, I have already converted all rows to Date but the problem persists where in some rows are being read as DD/MM/YYYY and some rows MM/DD/YYYY. This creates date discrepancy when I try to make data visualization using these data:(
I am unable to convert all rows in Column L to date format. Some rows are still being read as text/string.
if you have a spare column you can use this formula to correct it:
=DATE(RIGHT(A1; 4); MID(A1; 4; 2); LEFT(A1; 2))
also, you can try to change locale settings in your spreadsheet because it looks like that your spreadsheet uses mm/dd/yyyy format as default. eg. you can try for example Czech locale where default is dd/mm/yyyy
To format custom dates in Google Sheets:
Highlight the column to be formatted.
Navigate the app's menu path:
Format >> Number >> More Formats >> More data and time formats
Put your cursor in the top field of the popup and edit as necessary...
Delete parts you don't want.
Add parts you do want (but make sure you're adding them left-to-right).
Put character(s) between the fields as separators.
Format each part via its dropdown list of options.
Click the "Apply" button, and you're done.

query one sheet based on cell in another sheet

My master data sheet is named MASTER.
In my sheet named PRINT I want to be able to use a date picker, or somehow be prompted for a date, and then a Query pulls data from Master where date selected matches dates in MASTER column B. I have tried the following Query statement but it will only work if I change both sheets Date columns to TEXT format. I need to keep my date formats as is. If all that makes sense, I would really appreciate some help. My end goal is I just want a huge list of fabrication jobs, listed by date, to be queried and pulled to another sheet for printing. Leaving all Master data in tact and where the PRINT sheet can simply have a date change done by any user and get the list they need.
=Query(MASTER!A:P,ʺselect * where B ='ʺ&A2&ʺ'ʺ,0)
The above Query is on my TEST sheet where I have a date picker in column A2
Try:
=Query(MASTER!A:P,"select * where B =date"""&text(A2, "yyyy-mm-dd")&""" ",0)
and see if that works for you ?

Resources