bigquery converting the string datetime with timezone

Waku-2

A table with terabytes of data in bigquery got multiple columns set as string format but actually they contain datetime strings like

2016-10-24 15:00:00

I tried answer from this link to convert (CAST) the fields into timestamp format as below

SELECT
   CAST( MURDER_DATE AS TIMESTAMP) AS CONVERTED_MURDER_DATE, *
FROM `death_list`;

That works but it converts all strings into timestamps with UTC timezone as below

2007-03-23 15:00:00.000 UTC

I need the data in a different timezone. Any clue?

Fact

Try using

DATETIME(CAST( MURDER_DATE AS TIMESTAMP), "Australia/Sydney"))

この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。

侵害の場合は、連絡してください[email protected]

編集
0

コメントを追加

0

関連記事

分類Dev

Pandas: converting to datetime with timezone name

分類Dev

Converting string to DateTime safely

分類Dev

convert python datetime with timezone to string

分類Dev

Format DateTime to local string with a timezone

分類Dev

Converting String to Datetime2

分類Dev

How to change string to date without converting to any timezone in Swift?

分類Dev

Converting a time string to append with DateTime object

分類Dev

c# detect if the string is long or DateTime before converting

分類Dev

How to remove time segment completely from datetime after converting to string?

分類Dev

DateTime timezone not found in database

分類Dev

Python datetime.now() with timezone

分類Dev

Converting a String to Set<String>

分類Dev

Why python datetime replace timezone is returning different timezone?

分類Dev

Converting string to integer and then converting back to string

分類Dev

DateTime object and displaying date/time in alternate timezone

分類Dev

How to check that a datetime exists in a given timezone in Python?

分類Dev

Parsing postgres datetime with timezone with optional microseconds

分類Dev

Python (datetime) timezone conversion off by 4 minutes

分類Dev

Timezone.now()とdatetime.datetime.now()

分類Dev

Converting date and time from String format to Python datetime object: ValueError: time data '... p.m.' does not match format '... %p'

分類Dev

Converting string to date with Ruby

分類Dev

Converting ArrayList<String> to int[]

分類Dev

Converting String to Array with php

分類Dev

iOS - Converting String to Double

分類Dev

Converting Unicode string to ASCII

分類Dev

Converting a string into URL PHP

分類Dev

Converting list to string then integer

分類Dev

Converting a string with underscores to TitleCase

分類Dev

Converting a string to an object reference?

Related 関連記事

  1. 1

    Pandas: converting to datetime with timezone name

  2. 2

    Converting string to DateTime safely

  3. 3

    convert python datetime with timezone to string

  4. 4

    Format DateTime to local string with a timezone

  5. 5

    Converting String to Datetime2

  6. 6

    How to change string to date without converting to any timezone in Swift?

  7. 7

    Converting a time string to append with DateTime object

  8. 8

    c# detect if the string is long or DateTime before converting

  9. 9

    How to remove time segment completely from datetime after converting to string?

  10. 10

    DateTime timezone not found in database

  11. 11

    Python datetime.now() with timezone

  12. 12

    Converting a String to Set<String>

  13. 13

    Why python datetime replace timezone is returning different timezone?

  14. 14

    Converting string to integer and then converting back to string

  15. 15

    DateTime object and displaying date/time in alternate timezone

  16. 16

    How to check that a datetime exists in a given timezone in Python?

  17. 17

    Parsing postgres datetime with timezone with optional microseconds

  18. 18

    Python (datetime) timezone conversion off by 4 minutes

  19. 19

    Timezone.now()とdatetime.datetime.now()

  20. 20

    Converting date and time from String format to Python datetime object: ValueError: time data '... p.m.' does not match format '... %p'

  21. 21

    Converting string to date with Ruby

  22. 22

    Converting ArrayList<String> to int[]

  23. 23

    Converting String to Array with php

  24. 24

    iOS - Converting String to Double

  25. 25

    Converting Unicode string to ASCII

  26. 26

    Converting a string into URL PHP

  27. 27

    Converting list to string then integer

  28. 28

    Converting a string with underscores to TitleCase

  29. 29

    Converting a string to an object reference?

ホットタグ

アーカイブ