Hi all. Hopefully someone can help, I'm brand new to Big Query and these forums so hopefully I'm posting in the right place. I've got 2 issues. The first is how to convert the date to uk date format. And the 2nd is the overall format of the script
I have a query in BigQuery but currently the date field "activity_create_dtm" is in the format of YY-MM-DDThh:mm:ss
I need to convert this to uk format. I've worked out the following query:
Solved! Go to Solution.
If I'm reading your query correctly, you have:
SELECT ...
FROM <TABLE>
WHERE <EXPRESSION>
WHERE <EXPRESSION>
....
That isn't valid SQL. A SQL query can only have a single WHERE expression. If you want the expression to have multiple predicates, you would conjoin them with "AND" ... for example
SELECT ....
FROM <table>
WHERE <EXPRESSION> AND <EXPRESSION>
This implies that the issue is not at all related to the data formatting but it is related to SQL grammer in general.
If I'm reading your query correctly, you have:
SELECT ...
FROM <TABLE>
WHERE <EXPRESSION>
WHERE <EXPRESSION>
....
That isn't valid SQL. A SQL query can only have a single WHERE expression. If you want the expression to have multiple predicates, you would conjoin them with "AND" ... for example
SELECT ....
FROM <table>
WHERE <EXPRESSION> AND <EXPRESSION>
This implies that the issue is not at all related to the data formatting but it is related to SQL grammer in general.
That seems to have done the trick, thank you!