hiii .... 在Access数据库中,我有大约100个db记录,其中包含以下格式的电话号码:0000000000 我需要将电话号码格式更新为:(000)000-0000 有没有一种快捷的方法可以做到这一点不手动更改每条记录?他们是一个可以解决这个问题的正则表达式吗? 我用过这个函数但它显示错误为子串,Concat是Undifinedplz给出一些解决方案.....我正在使用Accessdb
更新 表 SET phone_number = CONCAT( ' (', SUBSTR(phone_number, 1 , 3 ), ' )', ' ', SUBSTR(phone_number, 5 , 3 ), ' - ', SUBSTR(phone_number, 9 , 3 ))解决方案 试试这个: Dim phoneNumber As 字符串 = 1234567890 phoneNumber = Cint (phoneNumber).ToString( (000)000-0000)
或
Dim Phone as String = 1234567890 Label1.Text = Phone.ToString.Format( ({0}){1} - {2} ,Phone.Substring( 0 , 3 ), Phone.Substring ( 3 , 3 ),Phone.Substring( 6 , 4 ))发现它这里 [ ^ ]
hiii.... In the Access database I have about 100 db records with the phone number in this format: 0000000000 I need to update the phone number format to: (000) 000-0000 Is there a quick way I could do this without changing each record manually? Is their a regular expression that could solve this problem? I had Used This Function But it Showing The Error As "Substring,Concat are Undifined" plz give some Solution.....am Using Accessdb
UPDATE table SET phone_number = CONCAT( '(', SUBSTR(phone_number, 1, 3), ')', ' ', SUBSTR(phone_number, 5, 3), '-', SUBSTR(phone_number, 9, 3) ) 解决方案 Try this: Dim phoneNumber As String = "1234567890" phoneNumber = Cint(phoneNumber).ToString("(000) 000-0000")Or
Dim Phone As String = "1234567890" Label1.Text = Phone.ToString.Format("({0}) {1}-{2}", Phone.Substring(0, 3), Phone.Substring(3, 3), Phone.Substring(6, 4))Found it here[^]
更多推荐
更新电话号码格式
发布评论