/ Forside/ Teknologi / Udvikling / ASP / Spørgsmål
Login
Glemt dit kodeord?
Brugernavn

Kodeord


Reklame
Top 10 brugere
ASP
#NavnPoint
smorch 9259
Harlekin 1866
molokyle 1040
Steffanst.. 758
gandalf 657
smilly 564
gibson 560
cumano 530
MouseKeep.. 480
10  Random 410
Sidste dag i en måned?
Fra : krag
Vist : 568 gange
50 point
Dato : 18-01-01 12:34

Er der en smart måde i ASP, hvor man kan få den sidste dag i en måned?

>>Krag

 
 
Accepteret svar
Fra : kim

Modtaget 60 point
Dato : 18-01-01 12:40

XL: Formulas that Return the Last or First Day of a Month

Fra følgende side:

http://support.microsoft.com/support/kb/articles/Q94/6/62.ASP

----

In Microsoft Excel 4.0 or later, you can use the EOMONTH function to return the last day of the current month. For example, the following formula

=EOMONTH(TODAY(),0)

returns the last day of the current month. Because the second argument(the MONTHS argument) is 0 (zero), the function assumes that the month you want to use is the current month. If the second argument is one (1), the function will return the last day of the following month.


/Kim

Godkendelse af svar
Fra : krag


Dato : 18-01-01 12:44

Perfekt, tak for det hurtige svar.


Kommentar
Fra : Nyhedsbruger


Dato : 18-01-01 13:08

krag wrote:
>
> Er der en smart måde i ASP, hvor man kan få den sidste dag i en måned?

Den er ikke smut, men den nemmeste måde er nok noget i retning af:

numdays = Day(DateSerial(theyear, themonth+1, 0))

--
Lauritz

Du har følgende muligheder
Eftersom du ikke er logget ind i systemet, kan du ikke skrive et indlæg til dette spørgsmål.

Hvis du ikke allerede er registreret, kan du gratis blive medlem, ved at trykke på "Bliv medlem" ude i menuen.
Søg
Reklame
Statistik
Spørgsmål : 177425
Tips : 31962
Nyheder : 719565
Indlæg : 6407923
Brugere : 218877

Månedens bedste
Årets bedste
Sidste års bedste