World Of Webmaster
Đăng nhập / Đăng ký
Account
Free for web
Check pagerank
Input check pager (Not http://)

Ext: blog.kai.vn
Check google pagerank
View HTML source
FUNCTION LIBRARY
HTML Tags Library
PHP Functions Library ASP Functions Library
ASP Functions DateDB
Chức năng: Điều chỉnh thời gian thành giá trị chuẩn ISO để ghi vào dữ liệu
Ngôn ngữ: asp - Nhóm: database
CÚ PHÁP
 formatteddate = DateDB(varDate) 

Chuyển đổi về định dạng chuẩn YYYY/MM/DD. Thường được sử dụng với function SQL_date.

VÍ DỤ
<%
  Dim a
    a = DateDB("27/10/2006")
  
  Response.Write a
  '--- returns 2006/10/27
%> 
ASP Code
<%
  Private Function DateDB(byVal varDate)
      If isDate(varDate) Then
          Dim myYear
          Dim myDay
          Dim myMonth
          vardate=CDate(varDate)
          myYear = Year(varDate)
          myDay = Day(varDate)
          myMonth = Month(varDate)
          If Len(myDay) = 1 Then myDay = "0" & myDay End if
          If Len(myMonth) = 1 Then myMonth = "0" & myMonth End if
          '---  transform date to standard DB type
          DateDB = myYear & "/" & myMonth & "/" & myday
          '---  add the time if available
          If datepart("h", vardate) <> 0 OR datepart("n", vardate) <> 0 OR datepart("s", vardate) <> 0 Then
              DateDB = DateDB &  " " & hour(varDate) & ":" & minute(varDate) & ":" & second(varDate)
          End if
      Else
          dataDB = NULL
      End if
  End Function '--- DateDB
%> 

CompactDB
EscapeApos
EscapeBit
EscapeDate
EscapeInt
MkDatabase
NoSQLInjection
Procedures
RecordCount
RecordCount2
Library ›› HTML Tag | PHP Function | ASP Function
Page : 806790
Online :
Visited : 370114
 
Liên h | Thêm vào Favorite | Gửi link qua e-mail | Thông tin website
Copright © 2009 KAI Blog
Code by BOINGOnline. Contact email : contact@kai.vn
Theme: default | classic |