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

Can somebody help with Time date?

Hi

I want to get the date in year month day and am usint the following, the timestamp is in the [Expected start] column and i have formated it as Date in excel.

SET TimeFormat='hh:mm:ss';
SET DateFormat='YYYY-MM-DD';
SET TimestampFormat='YYYY-MM-DD hh:mm:ss[.fff]';
SET MonthNames='jan;feb;mar;apr;maj;jun;jul;aug;sep;okt;nov;dec';
SET DayNames='må;ti;on;to;fr;lö;sö';

LOAD *,
Month(Date) As Month,
Year(Date) As Year,
Day(Date) as Day;
LOAD Date(Date#([Expected start], 'YYYY-MM-DD')) As Date,
Name,
[Expected start],
Object,
[Job type],
Variant,
Trade,
[Forecast hours],
[Functional location],
[Customer account],
[Reference type],
[Reference ID],
Description,
Priority,
Criticality,
[Expected end],
Status,
[Work order],
[Work order pools]

I have tried to find solution through the forum but cannot get it to work. the feilds Year month and day are empty when i load the data.

1 Solution

Accepted Solutions
saimahasan
Partner - Creator III
Partner - Creator III

Hi

By looking at your data, date seems to be perfect.

Try not using date#. instead use Date function.

View solution in original post

9 Replies
saimahasan
Partner - Creator III
Partner - Creator III

Can you please post sample data

Anonymous
Not applicable
Author

The file is quite big but here so i will just copy in an example here

Hope this is ok

 

   

Expected startObjectJob typeVariantTradeForecast hoursFunctional locationCustomer accountReference typeReference IDDescriptionPriorityCriticalityExpected endStatusWork orderWork order pools
2017-07-01OBJ00093INSPECTION0,00DK-JYL-SYDDK23476Maintenance sequencesLM-1-SISafety Inspection3Created
2017-01-01OBJ00093SERVICE0,00DK-JYL-SYDDK23476Maintenance sequencesLM-2-PMHalf Yearly Service3Created
2017-07-01OBJ00093SERVICE0,00DK-JYL-SYDDK23476Maintenance sequencesLM-2-PMHalf Yearly Service3Created
2017-04-01OBJ00088INSPECTION0,00DK-SJÆDK23089Maintenance sequencesLM-1-SISafety Inspection3Created
2016-10-01OBJ00088SERVICE0,00DK-SJÆDK23089Maintenance sequencesLM-4-PMQuarterly Service3Created
2017-01-01OBJ00088SERVICE0,00DK-SJÆDK23089Maintenance sequencesLM-4-PMQuarterly Service3Created
2017-04-01OBJ00088SERVICE0,00DK-SJÆDK23089Maintenance sequencesLM-4-PMQuarterly Service3Created
2017-07-01OBJ00088SERVICE0,00DK-SJÆDK23089Maintenance sequencesLM-4-PMQuarterly Service3Created
2017-01-01OBJ00089SERVICE0,00DK-JYL-MIDTDK23089Maintenance sequencesLM-3-PMService 3 times/Year3Created
2017-05-01OBJ00089SERVICE0,00DK-JYL-MIDTDK23089Maintenance sequencesLM-3-PMService 3 times/Year3Created

 

krishnacbe
Partner - Specialist III
Partner - Specialist III

Hi,

Check whether the field is Date Type from the data source. Might be in text format due to that you are not getting the values.

Anonymous
Not applicable
Author

Hi

Thanks for the tip, i have read about that in a similar thread and set the format to Date in the original Excel file.

/des

Chanty4u
MVP
MVP

try below


LOAD  *,
Name,
[Expected start],

Date(Date#([Expected start], 'YYYY-MM-DD'),'YYYY-MM-DD') As Date,

Month(Date) As Month,
Year(Date) As Year,
Day(Date) as Day

Object,
[Job type],
Variant,
Trade,
[Forecast hours],
[Functional location],
[Customer account],
[Reference type],
[Reference ID],
Description,
Priority,
Criticality,
[Expected end],
Status,
[Work order],
[Work order pools]

saimahasan
Partner - Creator III
Partner - Creator III

Hi

By looking at your data, date seems to be perfect.

Try not using date#. instead use Date function.

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Just like Saima Suggested you can try this.

LOAD *,
Month(Date) As Month,
Year(Date) As Year,
Day(Date) as Day;
LOAD Date([Expected start],'YYYY-MM-DD') As Date,
Name,
[Expected start],
Object,
[Job type],
Variant,
Trade,
[Forecast hours],
[Functional location],
[Customer account],
[Reference type],
[Reference ID],
Description,
Priority,
Criticality,
[Expected end],
Status,
[Work order],
[Work order pools]






Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
HirisH_V7
Master
Master

Hi,

Check this,

LOAD Date([Expected start],'YYYY-MM-DD') As Date,

Month(Date([Expected start],'YYYY-MM-DD')) as Month,

Year(Date([Expected start],'YYYY-MM-DD')) as Year,

Day(Date([Expected start],'YYYY-MM-DD')) as Day,

Name,

[Expected start],

Object,

[Job type],

Variant,

Trade,

[Forecast hours],

[Functional location],

[Customer account],

[Reference type],

[Reference ID],

Description,

Priority,

Criticality,

[Expected end],

Status,

[Work order],

[Work order pools]

HTH,

Hirish

HirisH
“Aspire to Inspire before we Expire!”
Anonymous
Not applicable
Author

Thanks for the help, the Date function worked.

Best regards

Des