Field tanggalnya di sort descending saja, dan ambil record yg paling atas..
"arief" <[EMAIL PROTECTED]>@yahoogroups.com on 19/04/2005 10:48:34 Please respond to [email protected] Sent by: [email protected] To: <[email protected]> cc: (bcc: Edi Herdiawan/ID/PNTS/ICI) Subject: Re: [indoprog-vb] Re: Cari Tanggal Terakhir jadi ngga ada fungsi Vb buat nyari tanggal akhir. kalo bergitu terima kasih mas Eko saya akan coba sarannya mas Eko. Thank's Arief � ----- Original Message ----- � From: Eko Heri Susanto � To: [email protected] � Sent: Tuesday, April 19, 2005 10:05 AM � Subject: [indoprog-vb] Re: Cari Tanggal Terakhir � > Saya Mau nanya , ada ngga fungsi VB untuk dapetin tanggal terakhir � di suatu bulan yah ?? � Setahu saya tidak ada function untuk mencari tanggal terakhir pada � sebuah bulan, tapi dengan sedikit akal-akalan kita bisa bikin � programnya. Logikanya gini jika kita inputkan tgl 20/04/2005, maka � kita kita ambil bulan dan tahunnya, tglnya kita replace menjadi tgl � 01, jadi dari tgl inputan yg semula 20/04/2005 kita ganti menjadi � 01/04/2005. Nah setelah tgl tsb kita replace langkah selanjutnya � adalah tgl tsb kita tambah 1 bulan, sehingga tgl yg baru menjadi � 01/05/2005. terakhir untuk mencari tgl terakhir, tgl yg sudah kita � tambah 1 bulan tsb kita kurangi 1 hari, sehingga tgl yg terakhir � menjadi 30/04/2005...selesai deh hehehehe... � Contoh coding spt ini: � Private Sub Command1_Click() � Dim mDate As Date � mDate = CDate("01" & Mid(Text1.Text, 3)) � Text2.Text = Format(DateAdd("d", -1, DateAdd("M", 1, � mDate)), "dd/MM/yyyy") � End Sub � Notes : � Format tgl pada coding diatas diasumsikan tanggal/bulan/tahun, jika � anda menggunakan format tgl bln/tanggal/tahun, codingnya harus anda � modifikasi. � Untuk berhenti berlangganan kirim email kosong ke : [EMAIL PROTECTED] � Ikuti juga forum diskusi VB.net dengan � mengirim email kosong ke [EMAIL PROTECTED] ------------------------------------------------------------------------------ � Yahoo! Groups Links ��� a.. To visit your group on the web, go to: ��� http://groups.yahoo.com/group/indoprog-vb/ ��� b.. To unsubscribe from this group, send an email to: ��� [EMAIL PROTECTED] ��� c.. Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. [Non-text portions of this message have been removed] Untuk berhenti berlangganan kirim email kosong ke : [EMAIL PROTECTED] Ikuti juga forum diskusi VB.net dengan mengirim email kosong ke [EMAIL PROTECTED] Yahoo! Groups Links To visit your group on the web, go to: http://groups.yahoo.com/group/indoprog-vb/ To unsubscribe from this group, send an email to: [EMAIL PROTECTED] Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. __ This email has been scanned for Viruses and Spam. For more information please contact your local Information Security representative. __ IMPORTANT NOTICE: This email may be confidential, may be legally privileged, and is for the intended recipient only. Unauthorised access, disclosure, copying, distribution, or reliance on any of it by anyone else is prohibited and may be a criminal offence.� Please delete if obtained in error and email confirmation to the sender. Untuk berhenti berlangganan kirim email kosong ke : [EMAIL PROTECTED] Ikuti juga forum diskusi VB.net dengan mengirim email kosong ke [EMAIL PROTECTED] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/indoprog-vb/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
