James Barash
James at fcidms.com
Tue Jul 24 09:05:45 CDT 2007
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