| Author |
Topic  |
|
|
joblenis
Starting Member
Canada
29 Posts |
Posted - 06/05/2007 : 11:43:32
|
I tried looking for assistance but I cant get my formatting to work. I was pretty sure yyyy=2007 and yy=07 but its not working right.
What I am doing is using Business Intelligence to read the previous days IIS logs. The logs are labeled as ex070602.log (exyymmdd.log) The code I use to get the previous day is dateadd("d",-1,getdate())
now I want to format the yy/mm/dd but I am getting single digits for the month and day and 4 digits for the year. Can someone tell me the expression I would need to use for this. Thank you kindly guys.
Some things I tried and results I got:
datepart("yy",dateadd("dd",-1,getdate())) = 2007 year(dateadd("dd",-1,getdate())) = 2007
day(dateadd("dd",-1,getdate())) = 4 month(dateadd("dd",-1,getdate())) = 6
Thanks. I appreciate the assistance.
|
|
|
DonAtWork
Flowing Fount of Yak Knowledge
2111 Posts |
|
|
joblenis
Starting Member
Canada
29 Posts |
Posted - 06/05/2007 : 12:43:25
|
| that works in sql but wont work in my business intelligence expression builder. It does not like the char function. Any other ideas? |
 |
|
|
DonAtWork
Flowing Fount of Yak Knowledge
2111 Posts |
|
|
madhivanan
Premature Yak Congratulator
India
22460 Posts |
Posted - 06/06/2007 : 09:56:25
|
Try
right(datepart("yy",dateadd("dd",-1,getdate())),2)+"/"+month(dateadd("dd",-1,getdate()))+"/"+day(dateadd("dd",-1,getdate()))
or search at http://support.businessobjects.com/
Madhivanan
Failing to plan is Planning to fail |
Edited by - madhivanan on 06/06/2007 09:58:20 |
 |
|
| |
Topic  |
|