Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access SQL Date Fuction

Status
Not open for further replies.

Nexsn

Technical User
Jun 18, 2013
1
AT
Hi community,

i hope i'm on the right place and teh right forum :)
First of all, sorry for my bad english, i'm trying my best!

Mabye some of you can help me with my problem.

I have a SQL function that works so far for TeraData.
Now i want it in Access.

here my where-clausel:
Abschluss_TS >= CAST(CURRENT_DATE - ((CURRENT_DATE - DATE '0001-01-07') MOD 7) -(20*7) +1 AS TIMESTAMP)

In Access it could be like:
WHERE ((Abschluss>=CDate(Now()-((Now()-CDate(#1/7/2001#)) Mod 7)-(20*7)+1)));

I get no error, but it do not work at all.

The clausel get me all entrys of my table whitch are exactly 20 full weeks in the past.

I want a new column in my table where i can see, mabye with a 1 or 0 whitch entrys are in the last 20 weeks.


I hope that was clear enough :D


greets and thanks !
Phil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top