Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date/ Year/ Month... Help

I have a Field that lists the Invoive Dates for  past sales as YYYYMMDD.  I was successfully able to convert it to MM/DD/YYYY by:

Date(Date#([Invoive Date]),'YYYYMMDD'),'MM/DD/YYYY') as [Invoice Date]

But, when i try to use the Year or Month Functions 01/05/2009 returns as:

Month: November  Year 56904

How can I correct this?

Thank you!

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Can you post the expression you are using?

Year(Date#([Invoive Date]),'YYYYMMDD')) as [Invoice Year]

should work.

View solution in original post

4 Replies
Not applicable
Author

Year(MakeDate(Left(DATE,4),Mid(DATE,5,2),Mid(DATE,7,2))) as [Year],

Month(MakeDate(Left(DATE,4),Mid(DATE,5,2),Mid(DATE,7,2))) as [Month],

Day(MakeDate(Left(DATE,4),Mid(DATE,5,2),Mid(DATE,7,2))) as [Day],

I have helped

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Can you post the expression you are using?

Year(Date#([Invoive Date]),'YYYYMMDD')) as [Invoice Year]

should work.

Not applicable
Author

Rob:  That worked!  THANK YOU!

Not applicable
Author

I need your help Mr Rob, will U?

Regards

Sagar Gupta