Hello All, SQLite newbie here. I've looked through the email archives and website trying to find out how to compute the difference in months between two given dates. Each date is in YYYY-MM-DD HH:MM:SS format. The best I've been able to come up with seems rather ugly: SELECT (strftime( '%Y', date1)*12+strftime('%m',date1)) - (strftime('%Y',date1)*12+strftime('%m',date1)) Am I on the right track, or is there something obvious I'm missing? Thanks in advance, Jeff Fowler
- [sqlite] Date arithmetic question Fowler, Jeff
- Re: [sqlite] Date arithmetic question drh
- RE: [sqlite] Date arithmetic question Fowler, Jeff
- Re: [sqlite] Date arithmetic question drh
- Re: [sqlite] Date arithmetic question Virgilio Fornazin
- Re: [sqlite] Date arithmetic quest... drh
- Re: [sqlite] Date arithmetic q... Markus Hoenicka
- RE: [sqlite] Date arithmet... Fowler, Jeff
- Re: [sqlite] Date arithmet... drh
- Re: [sqlite] Date arithmet... P Kishor
- RE: [sqlite] Date arithmetic q... Noah Hart