Subject Re: date class
From Mustansir Ghor <mustan31@hotmail.com>
Date Wed, 16 Jun 2021 13:10:39 -0400
Newsgroups dbase.getting-started

Dear Meryn Sir

Thank you.

I was applying the method on date object and not class.

Best Regards
Mustansir


Mervyn Bick Wrote:

> On 2021/06/15 20:59, Mustansir Ghor wrote:
> > Dear All
> >
> > The date class has a method oref.setyear(ExpN) which is suppose to change date object with same date and month but ExpN year. But it return GMT character date.
> >
> > Is there another way to it
> >
> > Best Regards
> > Mustansir
> >
>
> d = new date()
>
> ? d //This will show today's date
>
> d.setyear(2022)
>
> ?d //This will show the same month and day in 2022
>
> d.setmonth(0) // January . Months are from 0 for Jan to 11 for Dec
>
> ?d //This will show today's day in January 2022
>
> d.setDate(1)
>
> ?d // This will show 2022-01-01 (in the date format set for your computer.
>
>
> Mervyn