Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
sutharsan
Partner - Contributor II
Partner - Contributor II

How to Change Dates With Different Format Into DD-MMM-YYYY and Sum their Values

QuestionQuestionOutputOutput

Labels (1)
1 Solution

Accepted Solutions
sutharsan
Partner - Contributor II
Partner - Contributor II
Author

T1:
Load
Date(Replace(Date,'o','0'),'DD-MMM-YYYY') as DATE,
Value
FROM [lib://DB/Date Task.xlsx]
(ooxml, embedded labels, header is 1 lines, table is Sheet1);

Concatenate
LOAD
Date2 as DATE,
Value2 as Value
FROM [lib://DB/Date Task.xlsx]
(ooxml, embedded labels, header is 1 lines, table is Sheet1);

Concatenate
LOAD
Date(Date3,'DD-MMM-YYYY') as DATE,
Value3 as Value
FROM [lib://DB/Date Task.xlsx]
(ooxml, embedded labels, header is 1 lines, table is Sheet1);

Concatenate
LOAD
Date(Date#(Date1,'DD-MM-YYYY hh:mm:ss TT' ),'DD-MMM-YYYY') as DATE,
Value1 as Value
FROM [lib://DB/Date Task.xlsx]
(ooxml, embedded labels, header is 1 lines, table is Sheet1);

T2:
Load
DATE,
Sum(Value) as VALUE
Resident T1
Group By DATE;
Drop Table T1;

Got the Answers hope it might be usefull

View solution in original post

7 Replies
sidhiq91
Specialist II
Specialist II

@sutharsan  Which Date Column are we talking about here? Because I see date column from multiple table.

However your can try Date('Date','DD-MMM-YYYY')

Else

Date(Date#('Date','DD-MMM-YYYY'),'DD-MMM-YYYY')

sutharsan
Partner - Contributor II
Partner - Contributor II
Author

Hi man,

we need to change all the date format to DD-MMM-YYYY and display it as one table and sum the values .

sutharsan
Partner - Contributor II
Partner - Contributor II
Author

Tried these but it showing null values

sidhiq91
Specialist II
Specialist II

@ Can you please provide the sample data set?

sutharsan
Partner - Contributor II
Partner - Contributor II
Author

Here You Go

sutharsan
Partner - Contributor II
Partner - Contributor II
Author

T1:
Load
Date(Replace(Date,'o','0'),'DD-MMM-YYYY') as DATE,
Value
FROM [lib://DB/Date Task.xlsx]
(ooxml, embedded labels, header is 1 lines, table is Sheet1);

Concatenate
LOAD
Date2 as DATE,
Value2 as Value
FROM [lib://DB/Date Task.xlsx]
(ooxml, embedded labels, header is 1 lines, table is Sheet1);

Concatenate
LOAD
Date(Date3,'DD-MMM-YYYY') as DATE,
Value3 as Value
FROM [lib://DB/Date Task.xlsx]
(ooxml, embedded labels, header is 1 lines, table is Sheet1);

Concatenate
LOAD
Date(Date#(Date1,'DD-MM-YYYY hh:mm:ss TT' ),'DD-MMM-YYYY') as DATE,
Value1 as Value
FROM [lib://DB/Date Task.xlsx]
(ooxml, embedded labels, header is 1 lines, table is Sheet1);

T2:
Load
DATE,
Sum(Value) as VALUE
Resident T1
Group By DATE;
Drop Table T1;

Got the Answers hope it might be usefull

charishma01
Contributor
Contributor

Date(Date, 'Date format') as newdate;