jamalgholizadeh
پنج شنبه 07 تیر 1403, 08:12 صبح
سلام
چطور می شود با کد نویسی، فرمت عدد یک فیلد را تعیین کرد؟ (مثلا عدد سه رقم سه رقم جدا شود یا در عدد تاریخ ممیز قرار گیرد و ...)
سپاس
mazoolagh
شنبه 09 تیر 1403, 13:19 عصر
سلام و روز خوش
میتونین از تابع format استفاده کنین:
برای جدا کردن سه رقم سه رقم
format(1234567890123 , "standard")
1,234,567,890,123.00
format(1234567890123 , "#,###")
1,234,567,890,123
برای فرمت کردن تاریخ:
format(14030409 , "0000/00/00")
1403/04/09
format("14030409" , "0000/00/00")
1403/04/09
mazoolagh
شنبه 09 تیر 1403, 13:29 عصر
رفرنس: Format function (https://learn.microsoft.com/en-us/office/vba/language/reference/user-interface-help/format-function-visual-basic-for-applications)
نمونه کد:
MS Access: Format Function (with Numbers) (https://www.techonthenet.com/access/functions/numeric/format.php)
vBulletin® v4.2.5, Copyright ©2000-1404, Jelsoft Enterprises Ltd.