First Day of the Month

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I was wondering how to get the first day of the month as a datetime value. I don't want to set the date to a specified format because I want to display it, the way the user has it set on their machine.

Thanks
Jeff
 
Hi Jeff,

Mostly the first day of the month is day

"1" & now.month & now.year

Was you looking for that?.

Cor
I was wondering how to get the first day of the month as a datetime value.
I don't want to set the date to a specified format because I want to display
it, the way the user has it set on their machine.
 
Jeff,

Try using
-------------------------------

Dim dtNow As Date = Date.Now
Dim dtFirstOfMonth As Date = dtNow.AddDays(-dtNow.Day + 1)

-------------------------------

HTH,

Trev.

Jeff said:
I was wondering how to get the first day of the month as a datetime value.
I don't want to set the date to a specified format because I want to display
it, the way the user has it set on their machine.
 
That was exactly what I was looking for

Thank you

----- Trev Hunter wrote: ----

Jeff

Try usin
------------------------------

Dim dtNow As Date = Date.No
Dim dtFirstOfMonth As Date = dtNow.AddDays(-dtNow.Day + 1

------------------------------

HTH

Trev

Jeff said:
I was wondering how to get the first day of the month as a datetime value
I don't want to set the date to a specified format because I want to displa
it, the way the user has it set on their machine
 
* "=?Utf-8?B?SmVmZg==?= said:
I was wondering how to get the first day of the month as a datetime
value. I don't want to set the date to a specified format because I want
to display it, the way the user has it set on their machine.

\\\
Dim d As New DateTime(1999, 12, 1)
///
 
Back
Top