Come faccio a scrivere per cambiare il nome delle mie colonne, attualmente le date, solo al giorno?voglio cambiare appena le colonne continue numeriche nel mio foglio che sono attualmente date complete e sono in ordine dall'1 al 31 al solo giorno
ex 03/01/2020 al 1
03/02/2020 al 2

Vorrei anche aggiungere una colonna al mio foglio con il nome Abbv del mese.
Grazie in anticipo
Tabella datiScriptingRi: Come faccio a scrivere per cambiare il nome delle mie colonne, attualmente le date, solo al giorno?Grazie Jim, è fantastico.Ri: Come faccio a scrivere per cambiare il nome delle mie colonne, attualmente le date, solo al giorno?Ecco come risolverei la tua richiesta
Names Default To Here( 1 );
dt = Current Data Table();
theMonth=.;
For( i = 1, i <= N Cols( dt ), i++,
If( Substr( Column( dt, i ) << get name, 1, 2 ) == "N(",
If( isMissing(theMonth) == 1,
theMonth = Month( Informat( Word( 2, Column( dt, i ) << get name, "()" ), "m/d/y" ) );
);
Column( dt, i ) << set name(
Char( Day( Informat( Word( 2, Column( dt, i ) << get name, "()" ), "m/d/y" ) ) )
)
)
);
monthList = {"Jan","Feb","Mar","Apr","May","Jun",
"Jul","Aug","Sep","Oct","Nov","Dec"
};
dt << New Column( monthList[theMonth]);Ri: Come faccio a scrivere per cambiare il nome delle mie colonne, attualmente le date, solo al giorno?Potresti farlo in questo modo:
Names Default To Here( 1 );
dt = New Table( "Dates",
New Column( "date", "Numeric", "Continuous", Format( "Date Abbrev", 20 ), set values( Date DMY( Index( 1, 31 ), 3, 2020 ) ) )
);
Wait( 3 );
dt << New Column( "Day", Formula( Day( :date ) ) );
dt:date << hide();
dt << New Column( "Month",
Formula(
Match( Month( :date ),
1, "Jan",
2, "Feb",
3, "Mar",
4, "Apr",
5, "May",
6, "Jun",
7, "Jul",
8, "Aug",
9, "Sep",
10, "Oct",
11, "Nov",
12, "Dec"
)
)
);