[Gambas-user] Daynumer /Month

Jacky jscops at ...11...
Fri Jun 27 13:09:32 CEST 2008


Le Friday 27 June 2008 12:33:15 Stefan Miefert, vous avez écrit :
> Hellor,
>
> thanks. I  need the last day of a month:) My post is a little bit
> inaccurately:)

jrs = 01/04/08 ( french date format )
lastday = finmois(jrs)

PUBLIC FUNCTION finmois(Jrs AS Date) AS Integer
DIM Jrs1 AS Integer
IF Month(Jrs) < 12 THEN
 Jrs1 = Day(Date(Year(Jrs), Month(Jrs) + 1, 1) - 1)
ELSE
 Jrs1 = Day(Date(Year(Jrs) + 1, 1, 1) - 1)
ENDIF
RETURN Jrs1

END


Jacky





More information about the User mailing list