- Katılım
- 25 May 2018
- Mesajlar
- 1,610
- En iyi yanıt
- 14
- Puanları
- 113
- Konum
- İstanbul
- Web sitesi
- excelarsivi.com
- Ad Soyad
- Murat OSMA
- Office Vers.
- Microsoft 365 TR+EN
FORMATDATETIME( Date, [NamedFormat] )
Bir tarih veya saat olarak biçimlendirilmiş ifadeyi döndürür. (String)
Açıklamalar
* [NamedFormat] boş bırakılırsa, 0 kullanılır.
* Bu işlev VB 6.0'da eklenmiştir ve FORMAT 'ı kullanmaktan biraz daha hızlıdır.
Örnek Kullanım
Bir tarih veya saat olarak biçimlendirilmiş ifadeyi döndürür. (String)
Date | Biçimlendirilecek tarih (Date). |
[NamedFormat] | Biçimi belirten bir vbDateTimeFormat sabitidir. (Integer) |
0 = vbGeneralDate (varsayılan) | |
1 = vbLongDate | |
2 = vbShortDate | |
3 = vbLongTime | |
4 = vbShortTime |
Açıklamalar
* [NamedFormat] boş bırakılırsa, 0 kullanılır.
* Bu işlev VB 6.0'da eklenmiştir ve FORMAT 'ı kullanmaktan biraz daha hızlıdır.
Örnek Kullanım
PHP:
Sub ExcelTurkey()
MsgBox FormatDateTime(Date + TimeValue("04:30:00"), VbDateTimeFormat.vbGeneralDate)
MsgBox FormatDateTime(Date + Time(), VbDateTimeFormat.vbLongDate)
MsgBox FormatDateTime(Date, VbDateTimeFormat.vbLongDate)
MsgBox FormatDateTime(Date, VbDateTimeFormat.vbShortDate)
MsgBox FormatDateTime(Date + Time(), VbDateTimeFormat.vbLongTime)
MsgBox FormatDateTime(Time(), VbDateTimeFormat.vbLongTime)
MsgBox FormatDateTime(Time(), VbDateTimeFormat.vbShortTime)
Dim dtDate As Date
dtDate = #1/7/2011#
MsgBox FormatDateTime(dtDate, vbGeneralDate)
MsgBox FormatDateTime(dtDate, vbLongDate)
MsgBox FormatDateTime(dtDate, vbShortDate)
MsgBox FormatDateTime(dtDate, vbLongTime)
MsgBox FormatDateTime(dtDate, vbShortTime)
End Sub
Son düzenleme: