Roman F
asked on
Please modify the query (dates related)
Hi, everybody!
="Total for Week # " & Format$([InspectionDate]," ww",0,0)-- -> will give me number of the week (32 )
Total for Week# 32
how to make ------>(first day of the week -last day of the week)
Total for Week# 32 (08/04/2008-08/11/2008))
="Total for Week # " & Format$([InspectionDate],"
Total for Week# 32
how to make ------>(first day of the week -last day of the week)
Total for Week# 32 (08/04/2008-08/11/2008))
ASKER
sorry,
"the expression you entered contains invalid syntax
you may have entered a comma without a preceding value or identrifier"
="Total For Week # " Format$(InspectionDate,"ww ", 0, 0) & "(" & Format(InspectionDate-Week Day(Inspec tionDate)+ 2,"mm/dd/y yyy") & "-" & Format(InspectionDate-Week Day(Inspec tionDaet)+ 9,"mm/dd/y yyy")
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
To GRayL::
same error...
same error...
I tested my answer in the Immediate pane before posting. Try it by typing:
InspectionDate = #08/05/2008#
? "Total For Week # " Format$(InspectionDate,"ww ", 0, 0) & "(" & Format(InspectionDate-Week Day(Inspec tionDate)+ 2,"mm/dd/y yyy") & "-" & Format(InspectionDate-Week Day(Inspec tionDaet)+ 9,"mm/dd/y yyy") & ")"
This is all one line.
If you need the line breaks, add the line continuation character (underscore followed by Enter.
? "Total For Week # " Format$(InspectionDate,"ww ", 0, 0) & "(" & _
Format(InspectionDate-Week Day(Inspec tionDate)+ 2,"mm/dd/y yyy") & "-" & _
Format(InspectionDate-Week Day(Inspec tionDaet)+ 9,"mm/dd/y yyy") & ")"
InspectionDate = #08/05/2008#
? "Total For Week # " Format$(InspectionDate,"ww
This is all one line.
If you need the line breaks, add the line continuation character (underscore followed by Enter.
? "Total For Week # " Format$(InspectionDate,"ww
Format(InspectionDate-Week
Format(InspectionDate-Week
Well, use my formula:
="Total For Week # " & Format$([InspectionDate]," ww", 0, 0) & " (" & Format(DateWeekFirst([Insp ectionDate ], 2), "mm/dd/yyyy") & "-" & Format(DateWeekFirst(DateA dd("ww", 1, [InspectionDate]), 2), "mm/dd/yyyy") & ")"
It will even return the correct end date.
/gustav
="Total For Week # " & Format$([InspectionDate],"
It will even return the correct end date.
/gustav
ASKER
thank You, great
You are welcome!
/gustav
/gustav
format(DateAdd("d",first day of the week -last day of the week,last day of the week),"ww")