플밍_ASP
ASP - 오늘 날짜 구할때
잠수콩
2008. 11. 17. 12:02
today_time = Year(now) & Right("0"&Month(now),2) & Right("0"&day(now),2)
대부분 sql 쿼리문 짤때 asp 단에서 저렇게 월/일을 2자리로 안하면, 쿼리가 안되는 경향이...
select * from 테이블 where convert(varchar(10), gedate(), 121) = '"& Year(now) &'-'& Right("0"&Month(now),2) &'-'& Right("0"&day(now),2) &"'"
select * from 테이블 where convert(varchar(8), gedate(), 112) = '"& Year(now) & Right("0"&Month(now),2) & Right("0"&day(now),2) &"'"