/* */

Thursday, February 4, 2010

[belajar-access] Format Tanggal

----- Original Message -----
From: "Murid Belajar Access" <murid.belajaraccess@yahoo.co.id>
To: <belajar-access@yahoogroups.com>
Sent: Thursday, February 04, 2010 1:56 AM
Subject: FW: [belajar-access] Format Tanggal


> RTFM = Read The Fine Manual.
>
> Ini ditaruh di mana ya?
> Format tanggal itu defaultnya memang dalam format m/d/yyyy
>
> Format-format untuk dipakai di query / form / report
>
> Format(#6/1/2010#,"dd-mm-yyyy") --> menghasilkan 06-01-2010
> Format(#6/1/2010#,"dd/mm/yyyy") --> menghasilkan 06/01/2010
>
> Bahkan anda bisa langsung menuliskan formatnya di properties table, query,
> textbox.
> Atau pada statemen sqlnya.
>
> Beberapa contoh dari :
> http://msdn.microsoft.com/en-us/library/aa443998%28VS.60%29.aspx
>

> Dim MyTime, MyDate, MyStr
> MyTime = #17:04:23#
> MyDate = #January 27, 1993#
>
> ' Returns current system time in the system-defined long time format.
> MyStr = Format(Time, "Long Time")
>
> ' Returns current system date in the system-defined long date format.
> MyStr = Format(Date, "Long Date")
>
> MyStr = Format(MyTime, "h:m:s") ' Returns "17:4:23".
> MyStr = Format(MyTime, "hh:mm:ss AMPM") ' Returns "05:04:23 PM".
> MyStr = Format(MyDate, "dddd, mmm d yyyy") ' Returns "Wednesday,
> ' Jan 27 1993".
> ' If format is not supplied, a string is returned.
> MyStr = Format(23) ' Returns "23".
>
> ' User-defined formats.
> MyStr = Format(5459.4, "##,##0.00") ' Returns "5,459.40".
> MyStr = Format(334.9, "###0.00") ' Returns "334.90".
> MyStr = Format(5, "0.00%") ' Returns "500.00%".
> MyStr = Format("HELLO", "<") ' Returns "hello".
> MyStr = Format("This is it", ">") ' Returns "THIS IS IT".
>
> Salam hangat dan jabat erat,
> MBA
>
> -----Original Message-----
> From: belajar-access@yahoogroups.com
[mailto:belajar-access@yahoogroups.com]
> On Behalf Of nur
> Sent: Wednesday, February 03, 2010 22:41 PM
> To: belajar-access@yahoogroups.com
> Subject: [belajar-access] Format Tanggal
>
> saya membuat aplikasi di access dengan default =day(). ternyata keluar
> 6/1/2010 bagaimana cara membuat agar tanggal dan bulan menjadi dua digit
> jadi keluarnya 06/01/2010 soalnya saya pisah tanggal bulan dan tahunnya
> menggunakan fungsi =mid(), mohon maaf klo pertanyaannya terlalu mendasar
>

No comments:

Post a Comment