¾È±Ô °øºÎ¹æ

ACTIVE SERVER PAGE > ³¯Â¥ °ü·Ã ÇÔ¼ö

µî·ÏÀÏ : 2017-07-04 17:33 Á¶È¸¼ö : 52,815

À̹ø ÆäÀÌÁö¿¡¼­´Â ³¯Â¥¿¡ °ü·ÃµÈ asp ÇÔ¼öµéÀ» Á¤¸®ÇØ º¼±î ÇÕ´Ï´Ù.
 
¸ðµÎ ¾Æ½Ã´Â ³»¿ëµéÀÌ°ÚÁö¸¸,,, Á¤¸®ÇØ ³õÀ¸¸é ¸¹Àº µµ¿òÀÌ µÉ°Í °°±âµµ Çؼ­¿ä...
   
  8.1.1. now
  ÇöÀçÀÇ ³¯Â¥¿Í ½Ã°£À» Ãâ·Â ÇØ ÁÖ´Â ÇÔ¼ö ÀÔ´Ï´Ù... ¾ÆÁÖ À¯¿ëÇÏÁÒ...
 
  response.write now
°á°ú ------------------------------------
2002-02-14 ¿ÀÈÄ 6:49:00

 
  8.1.2. date
  ¿À´ÃÀÇ ³¯Â¥¸¦ Ãâ·ÂÇØ ÁÝ´Ï´Ù...

  response.write date
°á°ú ------------------------------------
2002-02-14


  8.1.3. year(),month(),day()
  ³âµµ,¿ù,ÀÏÀ» Ãâ·ÂÇØÁÖ´Â ÇÔ¼öµé ÀÔ´Ï´Ù.

  response.write year(date)&" "&month(date)&" "&day(date)&"<br>"

  8.1.4. time
   ½Ã°£À» Ãâ·ÂÇØ ÁÖ´Â ÇÔ¼ö ÀÔ´Ï´Ù.

   response.write time

  8.1.5. hour(),minute(),second()
  ½Ã°£À» Ãâ·ÂÇØ ÁÝ´Ï´Ù.(½Ã°£,ºÐ,ÃÊ)

   response.write hour(time)&" "&minute(time)&" "&second(time)&"<br>"

  8.1.6. Weekday()
  ³¯Â¥¸¦ ¿äÀÏ·Î ¹Ù²Ù¾î ÁÖ´Â ÇÔ¼öÀÔ´Ï´Ù.
  (1:ÀÏ¿äÀÏ , 2:¿ù¿äÀÏ......)

  response.write Weekday(date)

  8.1.7 DatePart()
  DAtePart ÇÔ¼ö´Â  ÁÖ¾îÁø ³¯Â¥ÀÇ Æ¯Á¤ °ªÀ» »Ì¾Æ ¿Ã¼ö ÀÖ½À´Ï´Ù.

response.write DATEPART("yyyy", now)&"<br>"
response.write DATEPART("m", now)&"<br>"
response.write DATEPART("d", now)&"<br>"
response.write DATEPART("h", now)&"<br>"
response.write DATEPART("n", now)&"<br>"
response.write DATEPART("s", now)&"<br>"
response.write DATEPART("q", now)&"<br>"
response.write DATEPART("ww", now)&"<br>"
response.write DATEPART("w", now)&"<br>"


ÀÎÀÚ°ª¿¡ ´ëÇÑ ¼³¸íÀº ¾Æ·¡ Ç¥¸¦ º¸½Ã¸é ÀÌÇØ°¡ °¡½Ç°Í °°³×¿ë~
 
¼³Á¤ ¼³¸í
yyyy ³â
q ºÐ±â
m ¿ù
y ÀÏ(Àϳ⠱âÁØ)
d ÀÏ
w ¿äÀÏ
ww ÁÖ(Àϳ⠱âÁØ)
h ½Ã
m ºÐ
s ÃÊ


  8.1.8. DateDiff()
  DateDiff ÇÔ¼ö´Â µÎ ³¯Â¥ »çÀÌÀÇ °£°ÝÀ» ¼öÄ¡·Î Ç¥ÇöÇØ ÁÖ´Â ÇÔ¼ö ÀÔ´Ï´Ù.

response.write dateDiff("yyyy","2001-01-01", now)&"<br>"
response.write dateDiff("m","2002-01-01", now)&"<br>"
response.write dateDiff("d","2002-01-01", now)&"<br>"
response.write dateDiff("h","2002-01-01", now)&"<br>"
response.write dateDiff("n","2002-01-01", now)&"<br>"
response.write dateDiff("s","2002-01-01", now)&"<br>"
response.write dateDiff("q","2002-01-01", now)&"<br>"
response.write dateDiff("ww","2002-01-01", now)&"<br>"
response.write dateDiff("w","2002-01-01", now)&"<br>"


ÀÎÀÚ°ªÀÇ »ç¿ë ¹æ¹ýÀº datepart ¿Í °°½À´Ï´Ù....
½Ç¹« ÇÁ·Î±×·¡¹Ö¿¡¼­ ¾ÆÁÖ À¯¿ëÇÏ°Ô »ç¿ëÇÒ ÀÏÀÌ ¸¹À»°Í °°Áö¿ä??

  8.1.9 DateSerial()
  ÁöÁ¤µÈ ³â, ¿ù, ÀÏÀÇ Date ÇÏÀ§ Çü½ÄÀÎ Variant¸¦ ¹ÝȯÇÕ´Ï´Ù.
 
  DateSerial(³â, ¿ù, ÀÏ) 
  response.write DateSerial(1990 - 10, 8 - 2, 1 + 1)

  À§ÀÇ ¿¹Á¦¸¦ º¸¸é 1990 ¿¡¼­ 10³âÀ» »©°í, 8¿ù¿¡¼­ 2´ÞÀ» »©°í, 1ÀÏ¿¡¼­ 1ÀÏÀ» ´õÇ϶ó´Â ¶æÀÔ´Ï´Ù.
  °á°ú´Â ¾î¶»°Ô ³ª¿Ã±î¿©??? '1980-06-02' ÀÌ·¸°Ô ³ª¿É´Ï´Ù.
 
  ÀÌ ÇÔ¼ö¸¦ »ç¿ëÇÏ¸é ¾ÆÁÖ À¯¿ëÇÏ°Ô »ç¿ëµÉ Àϵµ ¸¹°Ú³×¿ä.... º¹ÀâÇÑ ³¯Â¥ °è»êÀ» ÇÏÁö ¾Ê¾Æµµ
  µË´Ï´Ù...
 
  8.1.10. DateAdd()
  DataAdd ÇÔ¼ö´Â ÁöÁ¤µÈ ½Ã°£ °£°ÝÀ» Ãß°¡ÇÑ ³¯Â¥¸¦ ¹ÝȯÇÕ´Ï´Ù
 
  response.write DateAdd("m", 1, "95-01-01")

  À§ÀÇ ¿¹Á¦´Â 1995.1.1¿¡¼­ 1¿ù´ÞÀ» ´õÇ϶ó´Â ¸í·ÉÀÔ´Ï´Ù. °á°ú´Â 1995-02-01 ÀÌ µË´Ï´Ù.
  ¸¶Âù°¡Áö·Î DataPart() ÇÔ¼öÀÇ ÀÎÀÚ°ª°ú µ¿ÀÏÇÏ°Ô »ç¿ëµË´Ï´Ù.
 
  8.1.11. formatDateTime()
  ÇöÀçÀÇ ³¯Â¥/½Ã°£ Æ÷¸äÀ» ¹Ù²Ù¾î ÁÖ´Â ÇÔ¼ö ÀÔ´Ï´Ù.
response.write FormatDatetime(date,1)&"<br>"
response.write FormatDatetime(date,2)&"<br>"
response.write FormatDatetime(date,3)&"<br>"


°á°ú
-------------------------------------------------
2002³â 2¿ù 14ÀÏ ¸ñ¿äÀÏ
2002-02-14
¿ÀÀü 12:00:00
 
¡Ø Ȥ½Ã µµ¿òÀÌ µÇ¼Ì´Ù¸é ´ñ±Û¿¡ ÇѸ¶µð ³²°ÜÁÖ¼¼¿ä!
ÀÛ¼ºÀÚ   ºñ¹Ð¹øÈ£
ÀÚµ¿±Û ¹æÁö     (ÀÚµ¿±Û ¹æÁö ±â´ÉÀÔ´Ï´Ù.)
³»¿ë   ´ñ±Û´Þ±â 
À̸ÞÀÏ ¹®ÀÇ : cak0280@nate.com  
Copyright 2000 By ENTERSOFT.KR All Rights Reserved.