csharp Epicor:从午夜到实际时间转换秒数
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了csharp Epicor:从午夜到实际时间转换秒数相关的知识,希望对你有一定的参考价值。
public static string ConvertSecondsToTime(int secondsSinceMidnight)
{
// Initialize Variables
int hour = 0, minutes = 0, seconds = 0;
decimal hourSecondsLeftOver = 0;
// Get Hour
hour = (int) secondsSinceMidnight / 3600;
hourSecondsLeftOver = (decimal) secondsSinceMidnight - (hour * 3600);
// Get Minutes
minutes = (int) hourSecondsLeftOver / 60;
// Get Seconds
seconds = (int) hourSecondsLeftOver - (minutes * 60);
// Return Result
return String.Format("{0:00}:{1:00}:{2:00}", hour, minutes, seconds);
}
以上是关于csharp Epicor:从午夜到实际时间转换秒数的主要内容,如果未能解决你的问题,请参考以下文章
csharp Epicor 10.1从代码调用BAQ
csharp Epicor标准练习片段
csharp Epicor 10.1 - 获得价值或0
csharp Epicor UD Entry KeyField
csharp 的Epicor-WCF-j.cs
csharp 创建Epicor BO Instace WCF