|
 |
access thread: Fist Day of month
Message #1 by "Tim Maher" <tim.maher@s...> on Mon, 28 Oct 2002 10:00:58 +0000
|
|
Hi,
Can anyone give me a simple function to obtain the first day of a given
month (dd/mm/yy format). Many thanks
Tim
This e-mail transmission is strictly confidential and intended solely
for the person or organisation to who it is addressed. It may contain
privileged and confidential information and if you are not the
intended recipient, you must not copy, distribute or take any action
in reliance on it.
If you have received this email in error, please notify us as soon as
possible and delete it.
This e-mail has been scanned using Anti-Virus software, however,
Swansea NHS Trust accept no responsibility for infection caused by
any virus received on the recipients system.
Message #2 by JOHNWARDBELL@a... on Mon, 28 Oct 2002 06:35:14 EST
|
|
Hi Tim
Try this for size.
Function FirstOfMonth(Optional dteDate As Date) As Date
' This function calculates the first day of a month, given a date.
' If no date is passed in, the function uses the current date.
If dteDate = 0 Then
dteDate = Date
End If
' Find the first day of this month.
FirstOfMonth = DateSerial(Year(dteDate), Month(dteDate), 1)
End Function
johnb
Message #3 by "Gregory Serrano" <SerranoG@m...> on Mon, 28 Oct 2002 13:24:43
|
|
Tim,
<< Can anyone give me a simple function to obtain the first day of a given
month (dd/mm/yy format). Many thanks >>
Am I missing something in your question? Do you mean the first workday?
The day of the week the first day falls on? If you're just looking for
the first day of ANY month, that is simply... 1. Why would you need a
function for that?
Greg
|
|
 |