I am retrieving data from my company ERP system with Access .One of the field which mean for date [SDADDJ]was appear as 6 figure.
E.g 102365 mean 31th Dec 2002.
I am able to convert it with expression in the fields :
DelDate: Format(((DateValue("01/01/"+LTrim(Str(1900+Int([SDADDJ]/1000))))+[SDADDJ]-Int([SDADDJ]/1000)*1000))-1,"mm-dd-yy")
where [SDADDJ] is the date field & Deldate is the coverted field for the date.
The foramt come up is perfect when I am try to ask with (in query):
Between [Date Start] and [Date End].
The report is beutiful & correct & I ma happy it. However, later on I met several problem in calculating this date format.
Qusetion:
(1) When I want to check for today date using =Date(), it don't appear. How should I do?
(2) When I want to check the last 7 days using =< Date()-7, it also do not appear too. Where I am wrong?
(3) I would like to check from 1st day of the month till today e.g 23th with :
Between DateSerial(1,Year(Date()),Month(Date())) And Date(), it also not appear any result (zero output)
I have a doubt on the format of the date convertion, please commend what should I do for my above 3 question.
Thanks
jiajian
E.g 102365 mean 31th Dec 2002.
I am able to convert it with expression in the fields :
DelDate: Format(((DateValue("01/01/"+LTrim(Str(1900+Int([SDADDJ]/1000))))+[SDADDJ]-Int([SDADDJ]/1000)*1000))-1,"mm-dd-yy")
where [SDADDJ] is the date field & Deldate is the coverted field for the date.
The foramt come up is perfect when I am try to ask with (in query):
Between [Date Start] and [Date End].
The report is beutiful & correct & I ma happy it. However, later on I met several problem in calculating this date format.
Qusetion:
(1) When I want to check for today date using =Date(), it don't appear. How should I do?
(2) When I want to check the last 7 days using =< Date()-7, it also do not appear too. Where I am wrong?
(3) I would like to check from 1st day of the month till today e.g 23th with :
Between DateSerial(1,Year(Date()),Month(Date())) And Date(), it also not appear any result (zero output)
I have a doubt on the format of the date convertion, please commend what should I do for my above 3 question.
Thanks
jiajian