Date Time manipulation in Vb.net
Vb.net supports DateTime and formatting a Date time in a convenient and easy manner. Date time provides many features to work with date and time for different formats. We will see the format before seeing the functions and implementation.
Below are the supported formats.
Formats for Date and time Current date is 18/8/2008 then dd - 18 ddd - Mon dddd - Monday M - August 18 MM - 08 MMM - Aug MMMM- August Y - August, 2008 yy - 08 yyy - 2008 yyyy - 2008 yyyyy - 02008(will add leading zeros) yyyy g - 18-08-2008 A.D. hh - 03(hours) HH - 15(hours in railway time) mm - 10(minutes) ss - 27(Seconds) tt - AM or PM zzz - GMT
We can use the above formats in combined For Ex:
Format(DateTime.Now,”dd, MMM, yyyy g)
Will giev the below result 18, August, 2008 A.D.
In next article we will see more function od Date and Time.
-End of part 1-
|
No responses found. Be the first to respond and make money from revenue sharing program.
|