mysqlÊý¾ÝUnixʱ¼ä´ÁÓëC# DateTimeʱ¼äÀàÐÍ»¥»»
Unixʱ¼ä´Á×îСµ¥Î»ÊÇÃ룬¿ªÊ¼Ê±¼äΪ¸ñÁÖÍþÖαê׼ʱ¼ä1970-01-01 00:00:00
ConvertIntDateTime·½·¨µÄ»ù±¾Ë¼Â·ÊÇͨ¹ý»ñÈ¡±¾µØʱÇø±íʾUnixk¿ªÊ¼Ê±¼ä£¬¼ÓÉÏUnixʱ¼äÖµ£¨¼´¹ýÈ¥µÄÃëÊý£©.
ConvertDateTimeInt·½·¨µÄ»ù±¾Ë¼Â·ÊÇͨ¹ý¿Ì¶ÈÊý²î£¬Ôٰѿ̶ÈÊýת»»ÎªÃëÊý£¬µ±È»ÒªËµÃ÷µÄÊÇ£¬ÎÒÕâÀï·µ»ØµÄÊÇdoubleÀàÐÍ£¬ÒâÒåÉϲ¢·ÇÊÇÕæÕýµÄUnixʱ¼ä´Á¸ñʽ¡£
Òª»ñÈ¡ÕæÕýUnixʱ¼ä´ÁµÄ£¬Ö»»ñÈ¡ÕûÊý²¿·Ö¾Í¿ÉÒÔÁË¡£
dangranusing System;
using System.Collections.Generic;
using System.Text;
namespace WWFramework.DateTimes
{
/// <summary>
/// ʱ¼äÏà¹Øº¯Êý
/// </summary>
public static class Function
{
/// <summary>
/// ½«Unixʱ¼ä´Áת»»ÎªDateTimeÀàÐÍʱ¼ä
/// </summary>
/// <param name="d">double ÐÍÊý×Ö</param>
/// <returns>DateTime</returns>
public static System.DateTime ConvertIntDateTime(double d)
{
System.DateTime time = System.DateTime.MinValue;
System.DateTime startTime = TimeZone.CurrentTimeZone.ToLocalTime(new System.DateTime(1970, 1, 1));
time = startTime.AddSeconds(d);
return time;
}
/// <summary>
/// ½«c# DateTimeʱ¼ä¸ñʽת»»ÎªUnixʱ¼ä´Á¸ñʽ
&nb
Ïà¹ØÎĵµ£º
×÷Õß Ð¡ºÉ||¡¾×ªÔØʱÇëÎñ±ØÒÔ³¬Á´½ÓÐÎʽ±êÃ÷ÎÄÕÂÔʼ³ö´¦ºÍ×÷ÕßÐÅÏ¢¡¿
· ÓÀ¾ÃÁ´½Ó: http://www.oracleblog.cn/useful-script/prompt-of-sqlplus/
misc@ORALOCAL(192.168.0.49)>
Èç¹ûÄãÒ²ÏëºÍÎÒÒ»Ñù£¬ÔÚsqlplusµÇ¼Êý¾Ý¿âµÄʱºò£¬ÄÜÌáʾ²»ÉÙÏñÉÏÃæÕâÑùÏêϸµÇ¼µÄÐÅÏ¢£º
1.µÇ¼µÄÓû§Ãû¡£µ±ÄãµÄÊý¾Ý¿âÖÐÓжà¸ö ......
ÏÂÃæ¸ø³öÁËʹÓÃC# ¿ª·¢µÄÒ»¸öѹËõACCESSÊý¾Ý¿âµÄ³ÌÐò
ÏñFolderBrowserDialog£¨ÓÃÓÚä¯ÀÀÑ¡ÔñÎļþ¼ÐµÄ¶Ô»°¿ò£©¡¢MessageBox£¨ÏûÏ¢´¦Àí¶Ô»°¿ò£©¡¢DirectoryInfo£¨Ä¿Â¼ÐÅÏ¢£¬¿ÉÓÃÓÚ´´½¨¡¢¼ì²âÊÇ·ñ´æÔڵȶÔĿ¼µÄ²Ù×÷£©¡¢FileInfo£¨ÎļþÐÅÏ¢£¬¿ÉÓÃÓÚÎļþµÄ¼ì²â¡¢ÎļþÐÅÏ¢µÄ»ñÈ¡¡¢¸´ÖƵȲÙ×÷£©¡¢DataGridView£¨Êý¾Ý±í¸ñ¿Ø¼þ£¬ÓÃÓ ......
1.²é¿´µµ°¸
mysql> show binary logs;
+----------------+-----------+
| Log_name | File_size |
+----------------+-----------+
| ablelee.000001 | 150462942 |
| ablelee.000002 | 125 |
| ablelee.000003 | 106 |
+----------------+-----------+
2.ɾ³ýbin-log(ɾ³ýablelee.000003֮ǰµÄ¶øûÓаüº¬ablel ......
Õ⼸ÌìѧϰÁË´¥·¢Æ÷µÄÓ÷¨£¬¾õµÃ´¥·¢Æ÷ºÜºÃÓð¡¡£
´¥·¢Æ÷µÄ»ù±¾Óï·¨£º
CREATE TRIGGER <´¥·¢Æ÷Ãû><--
{BEFORE | AFTER}
{ INSERT | UPDATE | DELETE }
ON <±íÃû³Æ>
FOR EACH ROW
<´¥·¢Æ÷SQLÓï¾ä>
¹æÔò£º
1.´¥·¢Æ÷±ØÐëÓÐÃû×Ö£¬×î¶à64¸ö×Ö·û£¬¿ÉÄܺóÃæ»á¸½Óзָô·û.ËüºÍMySQLÖÐÆäËû¶ÔÏóµÄÃüÃû· ......