| 发表于:2007-07-03 18:53:28 楼主 |
private sub command1_click() dim m_year as integer, m_month as integer, m_day as integer dim temp as long, m_serry as long, m_str as string, str_year as string if (isnumeric(text1.text) = false) then msgbox "年份输入有问题 " exit sub end if if (isnumeric(text2.text) = false) then msgbox "月份输入有问题 " exit sub end if if (isnumeric(text3.text) = false) then msgbox "日期输入有问题 " exit sub end if str_year = text1.text str_year = trim(text1.text) if (len(str_year) > 4) then msgbox "年份输入有问题 " exit sub end if m_year = int(text1.text) m_month = int(text2.text) m_day = int(text3.text) if (m_month > 12) then msgbox "月份输入有问题 " exit sub end if if (m_day > 31) then msgbox "日期输入有问题 " exit sub end if m_year = m_year mod 100 temp = m_year and m_month and m_day m_serry = m_year m_serry = m_serry * 256 + m_month m_serry = m_serry * 256 + m_day m_serry = m_serry * 256 + temp m_str = str(m_serry) text4.text = trim(m_str) end sub 这段程序是将输入的年月日,生成一段数字。我的问题是如何将这段数字还原成年月日? |
|
|
|
|