I am trying to create three calculated fields which would return the day,
month and year of date field ArriveDate in a table named Booking but can't
seem to make it work.
I have tried Aday: Left([booking].[ArriveDate],2) and
Left([booking.ArriveDate],2) but I get an error message when i run the query
(Invalid bracketing of name).
Would appreciate any help in solving this (I hope) small problem.
Denis
Beetle - 17 Apr 2008 15:56 GMT
DatePart("d", [ArriveDate])
DatePart("m", [ArriveDate])
DatePart("yyyy", [ArriveDate])

Signature
_________
Sean Bailey
> I am trying to create three calculated fields which would return the day,
> month and year of date field ArriveDate in a table named Booking but can't
[quoted text clipped - 7 lines]
>
> Denis
KARL DEWEY - 17 Apr 2008 16:02 GMT
>>I get an error message when i run the query (Invalid bracketing of name).
Left([booking.ArriveDate],2) -- if you use an opening bracket for
table name you also need a closing for it. if you use an opening bracket
for field name you also need a closing for it.
Left([booking].[ArriveDate],2)
But dates are stored as a double precision number like this 39555.33 for
4/17/2008 7:56:08 AM.
You can use Day([booking.ArriveDate]), Month([booking.ArriveDate]), and
Year([booking.ArriveDate]) or Format([booking.ArriveDate],"d") for day,
Format([booking.ArriveDate],"m") for month, or
Format([booking.ArriveDate],"yyyy") for year.

Signature
KARL DEWEY
Build a little - Test a little
> I am trying to create three calculated fields which would return the day,
> month and year of date field ArriveDate in a table named Booking but can't
[quoted text clipped - 7 lines]
>
> Denis