>I need to include the whole datetime system value into a string but formatted in YYYYMMDDHHMMSS format, I'm sure this is really easy to do in C#...but I haven't found it yet. Hoping someone knows off the top of their head.
>
>
string DateString = System.DateTime.Now.ToString()
>
>Returns: 12/7/2007 11:33:55 AM
>
>How can I have it return a string in the same format as the vfp TTOC(DATETIME(),1)?
>
>Desired Result is: 20071207113355
>
>Thanks
>
>Kirk
I've never had to format time, but for date formating that way I use:
ProcDate.ToString("yyyyMMdd")