[dba-VB] VB.Net

jwcolby jwcolby at colbyconsulting.com
Tue Jul 24 09:26:20 CDT 2007


Thanks James.  It turns out that I was mixing up the CASE of the characters
and ending up with totally weird formatted strings as you might imagine.
Once I found the help for the format for dates and used the correct
characters, in the correct case (upper / lower) then it started working just
fine.

Thanks again for the response.

John W. Colby
Colby Consulting
www.ColbyConsulting.com 
-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of James Barash
Sent: Tuesday, July 24, 2007 10:06 AM
To: dba-vb at databaseadvisors.com
Subject: Re: [dba-VB] VB.Net

John:

You want:

DateTime.Now.ToString("yyyyMMdd-hhmmss")

James Barash 

-----Original Message-----
From: dba-vb-bounces at databaseadvisors.com
[mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby
Sent: Tuesday, July 24, 2007 9:53 AM
To: dba-vb at databaseadvisors.com
Subject: [dba-VB] VB.Net

I need to format a date as "YYYYMMYY-HHMMSS" and turn into a string to
include at the end of a filename.  There does not seem to be a format
property for the DateTime.Now itself.  In VBA I would use
format("FmtString",now()) but that doesn't work (no format keyword
apparently).  There is a format method of the string object but it still
requires an object to format which seems counter intuitive, it should just
format the string object that it is a method of.

So how do I accomplish what I am trying to do here?

John W. Colby
Colby Consulting
www.ColbyConsulting.com 

_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com

_______________________________________________
dba-VB mailing list
dba-VB at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/dba-vb
http://www.databaseadvisors.com




More information about the dba-VB mailing list