Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Paul Roberts — — source: Informix-list mailing list archive (1991-1998)
## i search for a way in sql to get an output jear and month
## like that:
## yyyymm
##
## ...where mm must have an leading zero for months < 10.
## column-type is
## date.
##
## my idea
## select YEAR(today) && MONTH(today) from anytable
##
## does not
## work, the zero is missing.....
How about this:-
select year(today) * 100 + month(today) from anytable
It's going to return an integer such as 199802.
- Paul
Your privacy choices
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.