I have a field: DTDUDT in a table, Type = Text 8 char. (The datainput
comes
from an AppendQuery linked to AS400, a the data is a date f.x. 20050218)
With another AppendQuery I take the data an 'transform' it using this:
DueDate: DateSerial(Left([DTDUDT];4);Mid([DTDUDT];5;2);Right([DTDUDT];2))
the format in the query is yyyy-ww, in the table/field I append to, is
the
format Date/Time yyyy-ww.
I have been reading in the groups for about 3 hours and some places they
show ways to put a leading zero in the week.
In the end I need to summarize the amount due, where I need the Year anf
Weeknumber.
Thanks in advance
OrdrupAB
Denmark
"Ken Snell [MVP]" skrev:
How are you converting? Are you running an update query to put this value
into that new field? Or are you wanting to display the "calculted" result
to
the user?
Tell us what you're doing and show us what you're using. Essentially, you
need to concatenate the two parts of the result (the yyyy and the ww
parts)
as strings, using the Format function to specify the number of "places"
to
use:
yyyyww = Format(DateField, "yyyy") & Format(Format(DateField, "ww"),
"00")
--
Ken Snell
<MS ACCESS MVP>
In a tabel I have a field 'DueDate' the format is Date/Time and
the
yyyymmdd.
Now I want to convert this in anorther field where I have the Year and
Week
in the format yyyyww, but how can I get a leading zero in the
weeknumber
??
My result is: 20057 where I want 200507.
Help would be very much appriciated.
OrdrupAB
Denmark