Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

How to load timestamp data into Oracle table?

jovia
7 - Meteor

The data in Excel is in a timestamp format. It reads in Alteryx as DateTime. It is in the format I need. After loading in Oracle, it becomes 12 hour format with 9 extra 0s.

How to make '2020-08-28 19:06:37' loaded into Oracle as '28-AUG-20 19:06:37'? 

Sample data and a screenshot of what is loaded into Oracle are attached. 

Thank you for your time!

9 REPLIES 9
Qiu
20 - Arcturus
20 - Arcturus

@jovia 
I am not expert of Oracle but maybe you need to set to column to "Date" instead of "TimeStamp" as per below.

https://apex.oracle.com/pls/apex/germancommunities/apexcommunity/tipp/6381/index-en.html

RolandSchubert
16 - Nebula
16 - Nebula

Hi @jovia ,

 

I think, the problem is related to column definition in Oracle. The TIMESTAMP data type  has 6 digits for "fractional seconds precision" by default, so you have the option to modify the settings for the timestamp column (e.g. using 'DD-MON-YY HH:MM:SS' as a specifier) or use a DATE column instead (maximum precision is a second, that's what you need).

 

Hope this is helpful.

 

Best,

 

Roland 

 

jovia
7 - Meteor

@Qiu ,

Thank you for your time. After I set these columns as date in Alteryx. They loaded as date only in Oracle. The timestamp all become 00:00:00. I will need the timestamp information for my analysis. 

atcodedog05
22 - Nova
22 - Nova

Hi @jovia 

 

Check out your oracle column datatype. Try once by converting to string and loading it to oracle temp table.

 

As per documentation i can see oracle has Date and DateTime datatype

https://docs.oracle.com/cd/B19306_01/olap.102/b14346/dml_datatypes005.htm

jovia
7 - Meteor

@RolandSchubert ,

 

I ran "alter session set nls_date_format='YYYY-MM-DD HH24:MI:SS'; " in Oracle. 

After these columns are loaded as date from Alteryx, they lost the time, please see the screenshot. 

date_0time_oracle.JPG

atcodedog05
22 - Nova
22 - Nova

Hi @jovia 

 

Just trying to help and trouble shoot. Can try these function and on a column and let me know.

https://www.oracletutorial.com/oracle-date-functions/

 

Seems like Alteyx and oracle have different date format.

06-AUG-2017 19:43:44

atcodedog05
22 - Nova
22 - Nova

Hi @jovia 

 

I might be still way from the answer but here is just a try.

Here is a workflow which converts alteryx dateformat to oracle dateformat. Can you give a try.

 

Output:

atcodedog05_0-1602595940883.png

Hope this helps 🙂

jovia
7 - Meteor

@atcodedog05 

 

Thank you for your help! 

I used your first suggestion: used select tool to convert them into string, load into Oracle, then use the to_date function in Oracle or convert to datetime in Tableau. 

But your workflow shows me how to use the datetime tool efficiently. I was struggling by the idea of putting one field at a time through the datetime tool. The transpose tool is such a cool tip!

atcodedog05
22 - Nova
22 - Nova

Hi @jovia 

 

Glad to hear it got sorted 🙂

 

Actually there is multi field tool which will work on multiple column. But Datetimeformat() function was not effective in converting to the required format. Hence had to use this method.

 

Read up on mutli field tool. Apply a formula on multiple columns

https://community.alteryx.com/t5/Interactive-Lessons/Multi-Field-Formulas/ta-p/424422

 

Happy to help 🙂 @jovia 

 

Cheers and Happy Analyzing 😀

Labels