Search the web
Sign In
New User? Sign Up
codesnips · Code Snippets
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Custom date time formats   Message List  
Reply | Forward Message #20 of 48 |
You Can easily Customize the display for your date time.
 
'/////////////////////////////////

Dim mydate As DateTime = DateTime.Now
Dim show_date As string

show_date= mydate.ToString("MMM dd,yyyy hh:mm:ss")

'/////////////////////////////////

Simply Pass the format as a parameter of overloaded method ToString.

Help For Format Specifier is following

 

Format specifiers Current culture Time zone Output
d, M en-US GMT 12, 4
d MMMM en-US GMT 12 April
12
dddd MMMM yy gg en-US GMT Thursday April 01 A.D.
h , m: s en-US GMT 6 , 13: 12
hh,mm:ss en-US GMT 06,13:12
HH-mm-ss-tt en-US GMT 06-13-12-AM
hh:mm, G\MT z      en-US GMT 05:13 GMT +0
hh:mm, G\MT z      en-US GMT +10:00 05:13 GMT +10
hh:mm, G\MT zzz en-US GMT 05:13 GMT +00:00
hh:mm, G\MT zzz en-US GMT –9:00 05:13 GMT -09:00


Mon Dec 2, 2002 9:27 pm

asimletters
Online Now Online Now
Send Email Send Email

Forward
Message #20 of 48 |
Expand Messages Author Sort by Date

You Can easily Customize the display for your date time. '///////////////////////////////// Dim mydate As DateTime = DateTime.Now Dim show_date As string ...
Asim
asimletters
Online Now Send Email
Dec 2, 2002
9:27 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help