数据类型转换笔记
2004-12-07 09:46
330 查看
if(strM.equals("01"))
{
intM1="12";
tim1=Integer.toString(Integer.parseInt(strY)-1)+"-"+intM1;
}
else
{
int w = (Integer.parseInt(strM)-1);
if(w>9)
tim1=(strY)+"-"+Integer.toString(w);
else
tim1=(strY)+"-"+"0"+Integer.toString(w);
}
if(strM.equals("12"))
{
intM2="01";
tim2=Integer.toString(Integer.parseInt(strY)+1)+"-"+intM2;
}
else
{
int w1=Integer.parseInt(strM)+1;
if(w1>9)
tim2=(strY)+"-"+Integer.toString(w1);
else
tim2=(strY)+"-"+"0"+Integer.toString(w1);
}
{
intM1="12";
tim1=Integer.toString(Integer.parseInt(strY)-1)+"-"+intM1;
}
else
{
int w = (Integer.parseInt(strM)-1);
if(w>9)
tim1=(strY)+"-"+Integer.toString(w);
else
tim1=(strY)+"-"+"0"+Integer.toString(w);
}
if(strM.equals("12"))
{
intM2="01";
tim2=Integer.toString(Integer.parseInt(strY)+1)+"-"+intM2;
}
else
{
int w1=Integer.parseInt(strM)+1;
if(w1>9)
tim2=(strY)+"-"+Integer.toString(w1);
else
tim2=(strY)+"-"+"0"+Integer.toString(w1);
}
相关文章推荐
- Effective Java 学习笔记(三)
- 基于角色的权限管理模型
- 从JBuilder到Eclipse--几个技巧
- 推荐若干个求职简历模板Doc文档下载
- Oracle最新技术网站 选择自 WantGoWorld 的 Blog
- 湘菜图片大集合
- 两天杂感
- SQLServer和Oracle的常用函数对比
- [转载]东航空姐用上海话唱的一首歌
- 使用 ASP.NET 2.0 ObjectDataSource 控件
- 四个笑话
- 很好的故事
- WEB编程防黑点滴(转)
- 心空了。。。。。。。
- 2004年12月的读书计划
- QQ超极无敌无诚意的回答
- 我是一块硬盘
- 拷贝文件(能显示进度条)[原创]
- 常见代码的编写规范(一)---列表数据的显示
- 解析.Net框架下的XML编程技术