Date function from database
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)
WeekdayName(weekday, abbreviate, firstdayofweek)
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center