date and time format

By bryan tugade

I have compiled a different type of format for date and time. Hope this compiled code for date and time can help you.

How to use this.
1. Put the dll into your bin folder.
2. Add this as a reference.
3. Use it in anyway you like.

i.e.
Imports btdateCompilation.btdc
Imports btdateCompilation

Partial Class _Default
Inherits System.Web.UI.Page
Private Shared myDate As New btdc
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
With myDate
Label1.Text = .customDate(Now, dtt.ShortDayname).ToString()
Label2.Text = .customDate(Now, dtt.fullDayName).ToString()
Label3.Text = .customDate(Now, dtt.hour12).ToString()
Label4.Text = .customDate(Now, dtt.hour24).ToString()
end with
End Sub


End Class

Sample Output


You can download the example here

Please let me know if there is something I missed. Happy Coding.

date and time format  (168 Views)
Create New Account