SEMPLICISSIMO!

dim data as date
dim giorno as integer

data = date
giorno = day(data)

ciao!