尊龙凯时人生就是搏

mysqlÖÐÄ¿½ñÈÕÆÚºÍʱ¼äµÄº¯Êý

mysql ÖлñÈ¡Ä¿½ñÈÕÆÚºÍʱ¼äµÄº¯Êý¹²ÓÐÈý¸ö£º1. now() º¯Êý£º·µ»ØÄ¿½ñÈÕÆÚºÍʱ¼ä £¬ÃûÌÃΪ ‘yyyy-mm-dd hh:mm:ss’£»2. curdate() º¯Êý£º·µ»ØÄ¿½ñÈÕÆÚ £¬ÃûÌÃΪ ‘yyyy-mm-dd’£»3. curtime() º¯Êý£º·µ»ØÄ¿½ñʱ¼ä £¬ÃûÌÃΪ ‘hh:mm:ss’¡£

MySQL ÖлñÈ¡Ä¿½ñÈÕÆÚºÍʱ¼äµÄº¯Êý

NOW() º¯Êý

NOW() º¯Êý·µ»ØÄ¿½ñÈÕÆÚºÍʱ¼ä £¬ÃûÌÃΪ ‘YYYY-MM-DD HH:MM:SS’¡£

Àý×Ó£º

SELECT NOW();

µÇ¼ºó¸´ÖÆ

Ч¹û£º

2023-03-08 14:32:31

µÇ¼ºó¸´ÖÆ

CURDATE() º¯Êý

CURDATE() º¯Êý·µ»ØÄ¿½ñÈÕÆÚ £¬ÃûÌÃΪ ‘YYYY-MM-DD’¡£

Àý×Ó£º

SELECT CURDATE();

µÇ¼ºó¸´ÖÆ

Ч¹û£º

2023-03-08

µÇ¼ºó¸´ÖÆ

CURTIME() º¯Êý

CURTIME() º¯Êý·µ»ØÄ¿½ñʱ¼ä £¬ÃûÌÃΪ ‘HH:MM:SS’¡£

Àý×Ó£º

SELECT CURTIME();

µÇ¼ºó¸´ÖÆ

Ч¹û£º

14:32:31

µÇ¼ºó¸´ÖÆ

ÆäËûÓ÷¨

³ýÁ˵¥¶ÀʹÓÃÕâЩº¯Êý £¬»¹¿ÉÒÔÓëÆäËûº¯ÊýÍŽáʹÓà £¬ÀýÈ磺

DATE_ADD()£ºÌí¼ÓÖ¸¶¨ÌìÊý»òʱ¼äµ½Ä¿½ñÈÕÆÚ»òʱ¼ä¡£

DATE_SUB()£º´ÓÄ¿½ñÈÕÆÚ»òʱ¼äÖмõÈ¥Ö¸¶¨ÌìÊý»òʱ¼ä¡£

DATE_FORMAT()£º½«ÈÕÆÚ»òʱ¼äת»»Îª²î±ðµÄÃûÌá£

×¢ÖØ£º

ÕâЩº¯Êý·µ»ØЧÀÍÆ÷ÉϵÄÄ¿½ñÈÕÆÚºÍʱ¼ä £¬¶ø²»ÊÇ¿Í»§¶ËÅÌËã»úÉϵÄÈÕÆÚºÍʱ¼ä¡£

ÒÔÉϾÍÊÇmysqlÖÐÄ¿½ñÈÕÆÚºÍʱ¼äµÄº¯ÊýµÄÏêϸÄÚÈÝ £¬¸ü¶àÇë¹Ø×¢±¾ÍøÄÚÆäËüÏà¹ØÎÄÕ£¡

ÃâÔð˵Ã÷£ºÒÔÉÏչʾÄÚÈÝȪԴÓÚÏàÖúýÌå¡¢ÆóÒµ»ú¹¹¡¢ÍøÓÑÌṩ»òÍøÂçÍøÂçÕûÀí £¬°æȨÕùÒéÓë±¾Õ¾ÎÞ¹Ø £¬ÎÄÕÂÉæ¼°¿´·¨Óë¿´·¨²»´ú±í尊龙凯时人生就是搏ÂËÓÍ»úÍø¹Ù·½Ì¬¶È £¬Çë¶ÁÕß½ö×ö²Î¿¼¡£±¾ÎĽӴýתÔØ £¬×ªÔØÇë˵Ã÷À´ÓÉ¡£ÈôÄúÒÔΪ±¾ÎÄÇÖÕ¼ÁËÄúµÄ°æȨÐÅÏ¢ £¬»òÄú·¢Ã÷¸ÃÄÚÈÝÓÐÈκÎÉæ¼°ÓÐÎ¥¹«µÂ¡¢Ã°·¸Ö´·¨µÈÎ¥·¨ÐÅÏ¢ £¬ÇëÄúÁ¬Ã¦ÁªÏµ尊龙凯时人生就是搏ʵʱÐÞÕý»òɾ³ý¡£

Ïà¹ØÐÂÎÅ

ÁªÏµ尊龙凯时人生就是搏

18523999891

¿É΢ÐÅÔÚÏß×Éѯ

ÊÂÇéʱ¼ä£ºÖÜÒ»ÖÁÖÜÎå £¬9:30-18:30 £¬½ÚãåÈÕÐÝÏ¢

QR code
sitemap¡¢ÍøÕ¾µØͼ