Is it possible to extract the month from date represented as int
(format YYYYMMDD, e.g. 20110401) using some bitwise operators?
If so, how can it be done?
edit:
I am currently using 20110401 % 10000 / 100. I thought bit-wise could be faster. DateTime.Parse etc. are too slow for what I am trying to do.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…