Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am using the following script to load a timestamp as its correct year and date:
Left Join
LOAD DATE ([ContractStartDate],'MM/DD/YYYY') AS ContractStartDate
,DATE([ContractStartDate],'YYYY') AS ContractStartYear
,DATE([ContractStartDate],'MM') AS ContractStartMonth
However, when I show the ContractStartYear as a list, it returns the same year multiple times, and even though each one looks the same, they actually pull a single day's worth of data, not the whole year.
Example:
ContractStartYear
2001 <--only refers to 01/05/2001
2001 <--only refers to 05/04/2001
2001 <--only refers to 07/12/2001 etc...
2001
2002
2002
Is there something I need to specify in the script so that it will instead yield the following:
ContractStartYear
2001 <--refers to entire year of 2001
2002 <--refers to entire year of 2002 etc...
Thanks!
You only changed the format of your dates to show only the year, but the date is still kept in the numerical representation.
Use year(DATEFIELD) instead to create a year field.
You only changed the format of your dates to show only the year, but the date is still kept in the numerical representation.
Use year(DATEFIELD) instead to create a year field.
Thanks!!