on 09-03-2008 9:30 AM
Hello,
I'm trying to get the week number displayed in a report by using the DateDiff function (tell me if this is wrong!)
If I use DateDiff ("ww", #4/06/2008#,#9/02/2008#, crMonday) I get the results I need.
But I need to use the report print date within this function
eg:
DateDiff ("ww", #4/06/2008#,##, crMonday) or DateDiff ("ww", #4/06/2008#,#(currentDate)#, crMonday)
However CR keeps throwing up an error about the time date literal not being understood.
Thanks in advance
I need to pull a parameter field from the report to use as acalculation date.
Is this possable?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alpana,
I dont seem to be able to get the feild in a date format as I have to use ToText.
The report feild is extracted from a table in the DB via this formula
(right (ToText ({temp_days.day_date}, "0"),2) + "/" + mid (ToText ({temp_days.day_date},"0"),5,2) + "/" + left (ToText ({temp_days.day_date},"0"),4))
IS there a way around this???
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have tried DateDiff ("ww", CDate(2008,04,06), {?Date Parameter}, , crMonday), but CR throws up "Date Value required here in the formula editor.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I needed to remove the # like
DateDiff ("ww", #4/06/2008#, CurrentDate, crMonday)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you want to remove u2018#u2019 you can try below formulas instead:
DateDiff ("ww", CDate(2008,04,06), CDate(2008,09,02), crMonday)
OR
For Current date:
DateDiff ("ww", CDate(2008,04,06), CurrentDate, crMonday)
For database fields:
DateDiff ("ww", {Orders.Order Date}, {Orders.Required Date}, crMonday)
For Date Parameter:
DateDiff ("ww", CDate(2008,04,06), {?Date Parameter}, , crMonday)
Let me know if this suits to your requirement.
Regards,
Alpana
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.