setdateyearmonth ('29/10/2005', 2013, 3)
|
Returns '29/03/2013 |
setdateyearmonth ('29/10/2005 04:26',
2013, 3)
|
Returns '29/03/2013 04:26'
To see the time part of the timestamp in a visualization, you must set the number formatting to Date and choose a value for Formatting that display time values. |
Add the example script to your app and run it. Then add, at least, the fields listed in the results column to a sheet in your app to see the result.
SetYearMonth:
Load *,
SetDateYearMonth(testdates, 2013) as NewYearMonth
Inline [
testdates
1/11/2012
10/12/2012
1/5/2013
2/1/2013
19/5/2013
15/9/2013
11/12/2013
2/3/2014
14/5/2014
13/6/2014
7/7/2014
4/8/2014
];
|
The resulting table contains the original dates and a column in which the year has be set to 2013. |
testdates |
NewYearMonth |
1/11/2012 |
1//3/2013 |
10/12/2012 |
10/3/2013 |
2/1/2012 |
2/3/2013 |
1/5/2013 |
1/3/2013 |
19/5/2013 |
19/3/2013 |
15/9/2013 |
15/3/2013 |
11/12/2013 |
11/3/2013 |
2/3/2014 |
2/3/2013 |
14/5/2014 |
14/3/2013 |
13/6/2014 |
13/3/2013 |
7/7/2014 |
7/3/2013 |
4/8/2014 |
4/3/2013 |
|
|