date-math

Powerbuilder Date Math

How do I subtract 30 days from a date in PowerBuilder? I have the following code that returns today's date in a parameter, but I need today - 30 days: dw_1.setitem(1, "begin_datetime", datetime(today(), Now())) ...

boost local_date_time math wrong?

I'm using Boost's datetime library in my project. I was very happy when I discovered that it has time duration types for hours, days, months, years, etc, and they change their value based on what you're adding them to (i.e. adding 1 month advances the month part of the date, it doesn't just add 30 days or somesuch). I thought this prop...

Comparing SQL date without current month

Hi! I have a table in Access with string columns and a date column. I want to get all the rows from the table when the date is lower than 22.10.2010, except this month. So, i need the rows from 30.09.2010 to ... I tied something, but I figured out it's not right: SELECT name FROM table WHERE YEAR(date)<=2010 AND MONTH(date)<10 But ...