Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Access SQL Date Fuction

Access SQL Date Fuction

Access SQL Date Fuction

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 !

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close