|
|
|
|
î¤éÞ / 2023-09-20 / ¿ÀÀü 10:55:36 / 165.246.204.198
Á¶È¸¼ö : 138
|
[±âŸ] DATEDIFF¸¦ »ç¿ëÇÒ ¶§ÀÇ °í·ÁÇÒ Á¡ |
DATEDIFF´Â ÀϹÝÀûÀ¸·Î 2°³ÀÇ ³¯Â¥°ª »çÀÌÀÇ ±âÁØ¿¡ µû¸¥ Â÷ÀÌ°ªÀ» µ¹·ÁÁÖ´Â ÇÔ¼öÀÌ´Ù.
´Ù¸¸ ¹®Á¦´Â ¿ì¸®°¡ »ý°¢ÇÏ´Â Â÷ÀÌ¿Í Á¶±Ý ´Ù¸£°Ô µ¿ÀÛÇÑ´Ù.
SELECT DATEDIFF(HOUR, '2023-09-20 10:50:34', '2023-09-20 10:55:34') ==> 0
SELECT DATEDIFF(HOUR, '2023-09-20 10:50:34', '2023-09-20 11:05:34') ==> 1
SELECT DATEDIFF(HOUR, '2023-09-20 10:50:34', '2023-09-20 11:55:34') ==> 1
SELECT DATEDIFF(HOUR, '2023-09-20 10:50:34', '2023-09-20 12:05:34') ==> 2
µû¶ó¼ °á°ú¿¡ ´ëÇØ Àß °í·ÁÇؼ »ç¿ëÇØ¾ß ÇÑ´Ù. |
|
|