Re: Update query with DatePart() problem
- From: "Ken Snell [MVP]" <kthsneisllis9@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 29 Jul 2005 14:55:14 -0400
You've left out the " characters to delimit the strings in the first
argument for the DatePart function:
UPDATE [Task frequencies] SET [Task frequencies].[Current period] =
DatePart("yyyy",Date())*1000+DatePart("y",Date())*[Task frequencies].[Day
span];
--
Ken Snell
<MS ACCESS MVP>
"MarkB" <MarkB@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C8E220A2-C4D8-4D4C-814A-5DC035A4959E@xxxxxxxxxxxxxxxx
>I have created a query that is supposed to update a field (current period)
>to
> a value based on the current date and the (Day span) field which contains
> non-zero values. The problem is that all results are zero.
>
> UPDATE [Task frequencies] SET [Task frequencies].[Current period] =
> DatePart(yyyy,Date())*1000+DatePart(y,Date())*[Task frequencies].[Day
> span];
>
> What am I doing wrong?
>
.
- References:
- Update query with DatePart() problem
- From: MarkB
- Update query with DatePart() problem
- Prev by Date: Re: Only Show records with latest date by vendor
- Next by Date: Percent decimal places .00%
- Previous by thread: Update query with DatePart() problem
- Next by thread: Percent decimal places .00%
- Index(es):
Relevant Pages
|
|