我想将DateTime中的所有显示连接到一个(1) [英] I want to connect all the display in DateTime into one(1)

查看:67
本文介绍了我想将DateTime中的所有显示连接到一个(1)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请帮我,我想将所有显示器连接成一个(1).
通信输出:
今天的日期:07:15:2013 12:00:00

我希望显示器看起来像这样.怎么样?

07152013120000

Pls help me i want to connect all the display into one(1).
commmon output:
date today: 07:15:2013 12:00:00

I want the display looks like this. How?

07152013120000

推荐答案

尝试以下操作:

Try this:

txtTest.Text = DateTime.Now.ToString();
txtTest.Text = DateTime.Now.ToString("MdyyyyHHmmss", 
                                     CultureInfo.InvariantCulture);


将分号或斜杠和空格替换为空...

有关替换功能,请看一下..
http://www.dotnetperls.com/replace [
Replace your semicolon or slash and spaces with empty...

For replace function,have a look at this..
http://www.dotnetperls.com/replace[^]

else you can do like this
DateTime.Now.ToString("MMddyyyyhhmmss")


这篇关于我想将DateTime中的所有显示连接到一个(1)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆