Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Keitaru
Creator II
Creator II

Trying to extract Month and Year from Date via Dataload Script

Hi

I'm trying to extract  Month and Year from my given date format  14/12/2018 11:47:35

I've tried both Month(date_data) and Year(date_data)

but getting  null value with in my table after i loaded the script.

 

1 Solution

Accepted Solutions
Frank_Hartmann
Master II
Master II

try like this:


Year(Timestamp#('14/12/2018 11:47:35','DD/MM/YYYY hh:mm:ss')) as Year
Month(Timestamp#('14/12/2018 11:47:35','DD/MM/YYYY hh:mm:ss')) as Month

replace '14/12/2018 11:47:35' with your Timestamp Field

View solution in original post

3 Replies
Frank_Hartmann
Master II
Master II

try like this:


Year(Timestamp#('14/12/2018 11:47:35','DD/MM/YYYY hh:mm:ss')) as Year
Month(Timestamp#('14/12/2018 11:47:35','DD/MM/YYYY hh:mm:ss')) as Month

replace '14/12/2018 11:47:35' with your Timestamp Field

Somasundaram
Creator III
Creator III

HI,

 

Year(Floor(Datefield)) as year

Month(Floor(Datefield)) as Month

 


-Somasundaram

If this resolves your Query please like and accept this as an answer.
Keitaru
Creator II
Creator II
Author

Oh thanks this worked!