T
Tausif Alam
Hi Guru,
I need your help again. I like to call a access Module in access query. But
it gives me error.
Module:
-----------
Function GetDatePart(pDate As Date) As String
Dim LYear As Integer
Dim LMth As Integer
Dim LDay As Integer
'Extract the year, month, and day values from the date parameter called
pDate
LYear = DatePart("yyyy", pDate)
LMth = DatePart("m", pDate)
LDay = DatePart("d", pDate)
'Format new number as a ddmmyyyy value
GetDatePart = Right("00" & CStr(LMth), 2) & "/" & Right("00" &
CStr(LDay), 2) & "/" & CLng(CStr(LYear))
End Function
QUERY:
-----------
SELECT GetDatePart(datestamp) from table1
Please guide me if I am doing any thing wrong.
Tausif.
I need your help again. I like to call a access Module in access query. But
it gives me error.
Module:
-----------
Function GetDatePart(pDate As Date) As String
Dim LYear As Integer
Dim LMth As Integer
Dim LDay As Integer
'Extract the year, month, and day values from the date parameter called
pDate
LYear = DatePart("yyyy", pDate)
LMth = DatePart("m", pDate)
LDay = DatePart("d", pDate)
'Format new number as a ddmmyyyy value
GetDatePart = Right("00" & CStr(LMth), 2) & "/" & Right("00" &
CStr(LDay), 2) & "/" & CLng(CStr(LYear))
End Function
QUERY:
-----------
SELECT GetDatePart(datestamp) from table1
Please guide me if I am doing any thing wrong.
Tausif.