|
|||||||
|
|
|
![]() |
|
|
Strumenti |
|
|
#1 |
|
Senior Member
Iscritto dal: Sep 2001
Città: Vicopisano (PI)
Messaggi: 11652
|
Formula per trovare i giorni di un mese
Raga c'è qualuno che sa la formula per trovare quanti giorni ha un mese di un determinato anno?
Si ok, faccio un select case sul mese, cmq come faccio a sapere se un anno è bisestile? (formula rulez! mi serve per un programmino....ciao e grazie! GHz!
__________________
>>PARTECIPA AI PROGETTI DI CALCOLO DISTRIBUITO CON BOINC.Italy!<<
You may say I'm a dreamer - But I'm not the only one - I hope someday you'll join us - And the team will be the 1# one BoincEmperor 1° Livello - Rotoloni DOCET!! Cactus rulez!! ![]() |
|
|
|
|
|
#2 |
|
Senior Member
Iscritto dal: Feb 2001
Città: Nordest
Messaggi: 217
|
In VB6?
Codice:
Public Function Days(y As Integer, m As Integer) As Integer Days = Day(DateSerial(y, m + 1, 0)) End Function
__________________
Chi non cerca trova. |
|
|
|
|
|
#3 |
|
Senior Member
Iscritto dal: Sep 2001
Città: Vicopisano (PI)
Messaggi: 11652
|
forte sta funzione dateserial....avevo sempre usato CDate!
Cmq perchè va messo m+1??? Ciao e grazie, GHz!
__________________
>>PARTECIPA AI PROGETTI DI CALCOLO DISTRIBUITO CON BOINC.Italy!<<
You may say I'm a dreamer - But I'm not the only one - I hope someday you'll join us - And the team will be the 1# one BoincEmperor 1° Livello - Rotoloni DOCET!! Cactus rulez!! ![]() |
|
|
|
|
|
#4 |
|
Senior Member
Iscritto dal: Feb 2001
Città: Nordest
Messaggi: 217
|
E' una specie di trucchetto
Partendo dall'anno e mese passati con i parametri, con DateSerial creo una data con: year = y month = m + 1 (cioè il mese seguente) day = 0 (cioè il giorno precedente al giorno 1) In questo modo ho determinato l'ultimo giorno del mese, da qui si estrae facilmente il giorno con Day()
__________________
Chi non cerca trova. |
|
|
|
|
|
#5 |
|
Senior Member
Iscritto dal: Sep 2001
Città: Vicopisano (PI)
Messaggi: 11652
|
Ingegnosissimo il trucchetto! Grazie tas!
__________________
>>PARTECIPA AI PROGETTI DI CALCOLO DISTRIBUITO CON BOINC.Italy!<<
You may say I'm a dreamer - But I'm not the only one - I hope someday you'll join us - And the team will be the 1# one BoincEmperor 1° Livello - Rotoloni DOCET!! Cactus rulez!! ![]() |
|
|
|
|
|
#6 | |
|
Senior Member
Iscritto dal: Dec 2001
Città: Lecce
Messaggi: 3936
|
Quote:
|
|
|
|
|
|
| Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 16:18.




















