{"rsdb":{"rid":"377545","subhead":"","postdate":"0","aid":"264187","fid":"106","uid":"1","topic":"1","content":"
\n

\u573a\u666f<\/h1> \n

\u8868\u793a\u65f6\u95f4\u7684\u6570\u636e\u683c\u5f0f\u4e3a\u6d6e\u70b9\u6570\uff0c\u5982\u4e0b\uff1a<\/p> \n

\"\"<\/p> \n

 <\/p> \n

 <\/p> \n

\"\"<\/p> \n

\u9700\u8981\u5c06\u5176\u683c\u5f0f\u5316\u4e3a{H:min:s.ms}\u683c\u5f0f\u7684\u5b57\u7b26\u4e32\uff0c\u6548\u679c\u5982\u4e0b\uff1a<\/p> \n

\"\"<\/p> \n

 <\/p> \n

 <\/p> \n

\"\"<\/p> \n

\u6ce8\uff1a<\/p> \n

\u535a\u5ba2\u4e3b\u9875\uff1a
https:\/\/blog.csdn.net\/badao_liumang_qizhi <\/a>
\u5173\u6ce8\u516c\u4f17\u53f7
\u9738\u9053\u7684\u7a0b\u5e8f\u733f
\u83b7\u53d6\u7f16\u7a0b\u76f8\u5173\u7535\u5b50\u4e66\u3001\u6559\u7a0b\u63a8\u9001\u4e0e\u514d\u8d39\u4e0b\u8f7d\u3002<\/p> \n

\u5b9e\u73b0<\/h1> \n
\n
\/\/\/<\/span> <summary><\/span>\r\n        \/\/\/<\/span> \u628a\u6d6e\u70b9\u6570\u683c\u5f0f\u5316\u4e3a{H:min:s.ms}\u683c\u5f0f\u7684\u5b57\u7b26\u4e32\r\n        <\/span>\/\/\/<\/span> <\/summary><\/span>\r\n        \/\/\/<\/span> <param name="f"><\/span>\u8981\u683c\u5f0f\u5316\u7684\u6d6e\u70b9\u6570<\/span><\/param><\/span>\r\n        \/\/\/<\/span> <returns><\/span>\u8fd4\u56de\u683c\u5f0f\u5316\u540e\u7684\u5b57\u7b26\u4e32<\/span><\/returns><\/span>\r\n        public<\/span> static<\/span> string<\/span> FormatFloatToDateTimeString(double<\/span> f)\r\n        {\r\n            <\/span>string<\/span> result = String.Empty;\r\n            <\/span>int<\/span> day = (int<\/span>)f \/ 3600<\/span> \/ 24<\/span>;\r\n            <\/span>int<\/span> hour = ((int<\/span>)f \/ 3600<\/span> % 24<\/span>);\r\n            <\/span>int<\/span> min = ((int<\/span>)f % 3600<\/span>) \/ 60<\/span>;\r\n            <\/span>int<\/span> sec = (int<\/span>)f % 60<\/span>;\r\n            <\/span>int<\/span> ms = (int<\/span>)Math.Round((f - (int<\/span>)f) * 1000<\/span>, 0<\/span>, MidpointRounding.AwayFromZero);\r\n\r\n            <\/span>if<\/span> (day > 0<\/span>)\r\n            {\r\n                result <\/span>= String.Format("<\/span>{0}.{1}:{2}:{3}.{4}<\/span>"<\/span>, day, DataProcessor.FillZero(hour.ToString(), 2<\/span>), DataProcessor.FillZero(min.ToString(), 2<\/span>), DataProcessor.FillZero(sec.ToString(), 2<\/span>), DataProcessor.FillZero(ms.ToString(), 3<\/span>));\r\n            }\r\n            <\/span>else<\/span>\r\n            {\r\n                result <\/span>= String.Format("<\/span>{0}:{1}:{2}.{3}<\/span>"<\/span>, DataProcessor.FillZero(hour.ToString(), 2<\/span>), DataProcessor.FillZero(min.ToString(), 2<\/span>), DataProcessor.FillZero(sec.ToString(), 2<\/span>), DataProcessor.FillZero(ms.ToString(), 3<\/span>));\r\n            }\r\n            <\/span>return<\/span> result;\r\n        }<\/span><\/pre> \n <\/div> \n 

 <\/p> \n

\u6548\u679c<\/h2> \n

\"\"<\/p> \n

 <\/p> \n

 <\/p> \n

\"\"<\/p> \n<\/div>","orderid":"0","title":"C#\u4e2d\u5c06long\u6d6e\u70b9\u6570\u683c\u5f0f\u5316\u4e3a{H:min:s.ms}\u683c\u5f0f\u7684\u5b57\u7b26\u4e32\u7684\u65b9\u6cd5","smalltitle":"","mid":"0","fname":".NET","special_id":"0","bak_id":"0","info":"0","hits":"220","pages":"1","comments":"0","posttime":"2019-10-10 18:14:56","list":"1570702496","username":"admin","author":"","copyfrom":"","copyfromurl":"","titlecolor":"","fonttype":"0","titleicon":"0","picurl":"https:\/\/www.cppentry.com\/upload_files\/","ispic":"0","yz":"1","yzer":"","yztime":"0","levels":"0","levelstime":"0","keywords":"\u4e2d\u5c06<\/A> long<\/A> \u70b9\u6570<\/A> \u683c\u5f0f<\/A> \u5316\u4e3a<\/A> H:min:s.ms<\/A> \u5b57\u7b26\u4e32<\/A> \u65b9\u6cd5<\/A>","jumpurl":"","iframeurl":"","style":"","template":"a:3:{s:4:\"head\";s:0:\"\";s:4:\"foot\";s:0:\"\";s:8:\"bencandy\";s:0:\"\";}","target":"0","ip":"14.17.22.37","lastfid":"0","money":"0","buyuser":"","passwd":"","allowdown":"","allowview":"","editer":"","edittime":"0","begintime":"0","endtime":"0","description":"C#\u4e2d\u5c06long\u6d6e\u70b9\u6570\u683c\u5f0f\u5316\u4e3a{H:min:s.ms}\u683c\u5f0f\u7684\u5b57\u7b26\u4e32\u7684\u65b9\u6cd5","lastview":"1713310014","digg_num":"0","digg_time":"0","forbidcomment":"0","ifvote":"0","heart":"","htmlname":"","city_id":"0"},"page":"1"}