Link to home
Start Free TrialLog in
Avatar of mehul bhakta
mehul bhakta

asked on

convert time

hello,

I have this data from an external company and after I import it into a table they send time stamps like this '2017-06-01T09:40:58.520+0000'

how can I convert it to 'DD-MON-YYYY HH24:MI:SS'

Many Thanks
Avatar of ste5an
ste5an
Flag of Germany image

First of all: These are ISO 8601 date/time values.

Then: You don't convert them. Store it as the appropriate DATETIME data type.

Don't mix up data type and formatting (visual representation).
Avatar of mehul bhakta
mehul bhakta

ASKER

ah problem is I need to convert them to the given format in order to use the column with other tables
ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Correct your data model. We store data according to the domain base type.
that's the one @ slightwv (䄆 Netminder)

especially with cast(to_timestamp_tz(t.start_utc,'YYYY-MM-DD"T"HH24:MI:SS.FF3TZHTZM') as date)

thank you :)
thank you for your help : )
No problem. Glad to help.