Click to See Complete Forum and Search --> : Ignore the Year of a date


pixie_1
June 17th, 2008, 09:14 PM
Hi

I have dates in the format of YYYY,MM,DD, 00:00:00

I need to create a report based on days of the month for every month e.g.
01,02,03,04..... of Jan, feb etc

This report is going to be used for years (I hope so anyway).

Basically I want to ignore the fact that the data is 2008 and just use the Day of the month and the Month of the year so,
01/01 (1st Jan) 02/01(2nd Jan) 21/05(21st May)

Ultimate aim is so that in 2009 I dont have to change the report to pick up 2009 figures

*There is a date range on the report which allows to pick dates and year)

DavidCh
June 18th, 2008, 04:37 PM
I hope I'm understanding your problem. I rarely if ever hard code dates.

Depending on whether you are using Basic or Crystal language you can use the Year function.

You could simply use something like: year(today). This will always return the current year.

HTH.

jggtz
June 19th, 2008, 12:52 PM
You can use date functions : DAY and MONTH

pixie_1
June 22nd, 2008, 06:56 AM
How would I write this properly?

If Month{AU.Load Date}) = 05 and day({AU.Load Date}) = 01 Then datecount:=datecount+1

Thanks :)

jggtz
June 23rd, 2008, 02:26 AM
That is ok (just declare the variable before)

numberVar datecount :=
If Month{AU.Load Date}) = 05 and day({AU.Load Date}) = 01 Then datecount:=datecount+1