FilemakerTurk, AYS Bilişim ve Beyaz Net tarafından desteklenmektedir.
Filemaker Danışmanınız
AYS Bilişim
Mehmet KAYA
 0532 231 07 27
 0216 318 55 80
 mkaya@aysbilisim.net
						

Yaş Hesabı Nasıl Yapılır?

+2 oy
764 kez görüntülendi
Yaş hesabı fonsiyonu yazmak istiyorum yani CUSTOM FUNCTIONS olarak kullanmak istiyorum. Yardım Lütfen.
17, Şubat, 2015 Custom Functions kategorisinde Mehmet KAYA (165,360 puan) tarafından soruldu
6, Mart, 2015 Mehmetblg tarafından düzenlendi

2 Cevaplar

+2 oy

CUSTOM FUNCTİON

Function Name

#Age (Diyez işareti koymamın sebebi en üste çıkması)

Function Parameters

-Birth  -TheDate  -Format

#Age(Birth; TheDate; Formate)

Let ( leapFactor = If ( Mod ( Year ( theDate ) ; 4 )  = 0 ; 1 ; 0 );


Case (

// Age in years
Format = 1 ; Year ( theDate ) - Year ( Birth ) - ( ( DayOfYear ( theDate ) - leapFactor ) < DayOfYear ( Birth ) );


// Age in years and days
Format = 2 ; Year ( theDate ) - Year ( Birth ) - ( ( DayOfYear ( theDate ) - leapFactor ) < DayOfYear ( Birth ) ) & " yıl" & Case (
( DayOfYear ( theDate ) - leapFactor ) ≥ DayOfYear ( Birth ) ; DayOfYear ( theDate ) - leapFactor - DayOfYear ( Birth )  ;
DayOfYear ( theDate ) + ( DayOfYear ( Date ( 12 ; 31 ; Year ( theDate ) ) - DayOfYear ( Birth ) - leapFactor ) ) ) & " gün" ;


// Age in years, months and days
Format = 3 ;  Year ( theDate ) - Year ( Birth ) - ( ( DayOfYear ( theDate ) - leapFactor ) < DayOfYear ( Birth ) ) & " yıl" & Mod ( Month ( theDate ) - Month ( Birth ) + 12 - (Day ( theDate ) < Day ( Birth ) ) ; 12 ) & " ay" & (theDate - Date ( Month ( theDate ) - (Day ( theDate ) < Day ( Birth ) ) ; Day ( Birth ) ; Year ( theDate ) ) ) & " gün"

)
)

 

17, Şubat, 2015 Mehmet KAYA (165,360 puan) tarafından cevaplandı
+1 oy

Bir dosya olarak hazırlamıştım. Alttaki kodu ile aynıymış :) Bilseydim buradan kopyalardım :) 

Örnek Dosya

22, Eylül, 2015 Goksel_Gokce (96,900 puan) tarafından cevaplandı
...