firstday=datetime.date(anio,mes,sov[0]) did it.




On Feb 28, 12:43 pm, greenpoise <danel.sega...@gmail.com> wrote:
> Nevermind, got it.
>
> thanks anyways
>
> d
>
> On Feb 28, 12:34 pm, greenpoise <danel.sega...@gmail.com> wrote:
>
>
>
> > I am trying to use the calendar.monthrange function to return the last
> > weekday of the month but my datefield in my model, wont accept 2
> > (february), it needs 02.
>
> > now = datetime.datetime.now()
> > mes = now.month
> > anio = now.year
> > sov=calendar.monthrange(anio,mes)
>
> > how could I format this with a current date? or is there an easier way
> > to find out first and last weekday??
>
> > thanks

Reply via email to