-
Date function from database
Hi guys
I'm writing an item subscription program for my class. the Acess database records include StartDate and EndDate for subscription. I'd like to have a function to go through the record and check for persons whose subscription expires next month if today is on the 28th of this month provided today is not weekend. The function shoul list the firstname of the affected person on a form.
I also want a function to sniff thru record and add values from last monday till today id today is friday . The function should place the totalvalue in the field named week with the week number
Thesame should actually be done for the month by adding the totals of every in that month together and place it in a field named month with monthname
i'm really new to vb..... Can someone help me on this....
its for my college project... doing this really means alot to my career
Thank you for all ur time
-
Try the DatePart function
The DatePart function returns any part of the date that you want. The day, or the month, or the year, or the week ect..
Also there is a DateDiff Function for date calculations.
Some Available Date functions (use help for more info):
DatePart(interval, date[,firstdayofweek[, firstweekofyear]])
DateDiff(interval, date1, date2[, firstdayofweek[, firstweekofyear]])
DateAdd(interval, number, date)
DateSerial(year, month, day)
DateValue(date)
Day(date)
Month(date)
Year(date)
Now()
Weekday(date, [firstdayofweek])
WeekdayName(weekday, abbreviate, firstdayofweek)
CDate(expression)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks