常用的函数

函数用于辅助数据处理
中文转换函数
英文转换函数
身份证函数

Dim Identify As String = "610231197005212768"
If ValidPIN(Identify) = False Then
    Output.Show("无效身份证")
Else
    Dim Sex As String = ReadSex(Identify)
    Dim Birth As Date = ReadBirthDay(Identify)
    Output.Show("性别:" & Sex & ",出生日期:" & Birth)
End If 

格式化Format

'格式化Format函数
Output.Show(Format(1, "000")) '001
Output.Show(Format(1.2, "0.00")) '1.20
Output.Show(Format(#2/13/2001#, "yyyy年mm月dd日")) '2001年2月13日

加解密

'字符串加解密
Dim s As String = "罗涛"
Dim s1 As String = EncryptText(s, "a", "6")
Dim s2 As String = DecryptText(s1, "a", "6")
Output.Show("加密后:" & s1)
Output.Show("解密后:" & s2)
'文件加解密:EncryptFile(InFile, OutFile, PassWord)
EncryptFile("c:\temp\Logo.jpg", "c:\temp\Logo2.jpg", "fox123")
DecryptFile("c:\temp\Logo2.jpg", "c:\temp\Logo3.jpg", "fox123")

数学函数

'数学函数
Math.Abs( - 1.23) '1.23 绝对值
Math.Round(3.44, 1) '3.4 舍入到接近的整数或指定的小数位数
Math.Round(3.45, 1) '3.4
Math.Round(3.46, 1) '3.5
Math.Ceiling(123.1) '124 向上取整
Math.Floor(123.1) '123 向下取整
Math.Max(100, 1) '100 最大数
Math.Min(100, 1) '1 最小数

财务函数

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值