Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to Formatting DATE Field (YYYY-MM-DD :hh:mm:SS) into dates interval

Problem facing while  trying the convert of  timestamp(YYYY-MM-DD :hh:mm:SS) into date format   and get the duration of two dates .

1 Solution

Accepted Solutions
Anil_Babu_Samineni

May be using these?

Diff:

Load

Date(Date#(UPLD_TS,'YYYY-MM-DD-hh.mm.ss.ffffff'),'YYYY-MM') as Date,

Date(Date#(PROCESS_TS,'YYYY-MM-DD-hh.mm.ss.ffffff'),'YYYY-MM') as Date1,

Date(Date#(UPLD_TS,'YYYY-MM-DD-hh.mm.ss.ffffff'),'YYYY-MM-DD:hh:mm:SS') as Time

resident Time ;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful

View solution in original post

3 Replies
Anil_Babu_Samineni

May be using these?

Diff:

Load

Date(Date#(UPLD_TS,'YYYY-MM-DD-hh.mm.ss.ffffff'),'YYYY-MM') as Date,

Date(Date#(PROCESS_TS,'YYYY-MM-DD-hh.mm.ss.ffffff'),'YYYY-MM') as Date1,

Date(Date#(UPLD_TS,'YYYY-MM-DD-hh.mm.ss.ffffff'),'YYYY-MM-DD:hh:mm:SS') as Time

resident Time ;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

Anil thanks,how can to get the difference of two dates i.e., duration b/w two time frames

Anil_Babu_Samineni

May be this?

Date(Interval(Date-Date1),'YYYY-MM-DD:hh:mm:ss') as Date2;

Explanation: Here, Interval works as Number after that we need to control as out requirement using Date function

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful