|
' ********************************************************************
' DTPickerのVALUEフォーマットへの変換
' ********************************************************************
Function DtpValue( strValue )
if strValue = "" then
DtpValue = Now
Exit Function
end if
sToken1 = Split( strValue, " " )
sToken2 = Split( sToken1(0), "/" )
strFromDate = "1899/12/30"
strToDate = sToken2(2) & "/" & Zero(sToken2(0),2) & "/" & Zero(sToken2(1),2)
DtpValue = DateDiff( "d", DateValue(strFromDate),DateValue(strToDate) )
End Function
' ********************************************************************
' 前ゼロ付加
' ********************************************************************
Function Zero( strValue, nLength )
Zero = Right( String( nLength, "0" ) & strValue, nLength )
End Function
| |