define a static method to convert datatime to a formatted string with uesr-defined
来源:互联网 发布:网络语言暴力的根源 编辑:程序博客网 时间:2024/06/06 05:07
public static string DateToString( DateTime dt , string splitter )
{
string sTemp = String.Empty;
if(dt.Month < 10)
{
sTemp += "0";
}
sTemp += dt.Month.ToString();
sTemp += splitter;
if( dt.Day < 10 )
{
sTemp += "0";
}
sTemp += dt.Day.ToString();
sTemp += splitter;
sTemp += dt.Year.ToString();
return sTemp;
}
{
string sTemp = String.Empty;
if(dt.Month < 10)
{
sTemp += "0";
}
sTemp += dt.Month.ToString();
sTemp += splitter;
if( dt.Day < 10 )
{
sTemp += "0";
}
sTemp += dt.Day.ToString();
sTemp += splitter;
sTemp += dt.Year.ToString();
return sTemp;
}
- define a static method to convert datatime to a formatted string with uesr-defined
- convert a string to XmlElement
- How to convert a String to DateTime
- Convert a String to a Number
- contextTypes was defined as an instance property on MyButton. Use a static property to define contex
- convert List<String> to a String
- Convert a string to an enum
- experiment : convert a string to crc32
- Read/convert an InputStream to a String
- Python convert a list to String
- Return a formatted string
- convert a hexadecimal string to a byte string
- Write a method to replace all spaces in a string with ‘%20’.
- Write a method to replace all spaces in a string with ‘%20’
- Ch1-5: Write a method to replace all spaces in a string with ‘%20’.
- Q1.4 Write a method to replace all spaces in a string with ‘%20’.
- Implement atoi to convert a string to an integer.
- Swift: How to convert a String to UInt8 array?
- 数据压缩技术简史
- 互联网同学青年印象
- new!
- axis服务的get方式访问
- 用Cg实现卡通着色
- define a static method to convert datatime to a formatted string with uesr-defined
- asp.net百问百答
- 从asp到asp.net之快速转型
- 孙子兵法
- ServerVariables变量
- ServerVariables变量
- Tomcat5.5.X 的安装和配置
- 担心
- C#中使用ref和out一点认识!