Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parsing an FTP MDTM datetime
Message
From
28/12/2006 11:26:26
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Environment versions
Environment:
C# 2.0
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01180693
Message ID:
01180697
Views:
15
This message has been marked as the solution to the initial question of the thread.
>Ok I'm having a little diffuculty with the parsing of a datetime from the MDTM FTP command.
>
>This is the return date I'm trying:
>
>
>20060607231948.552
>
>
>The code I've attempted as taken from the immediate window that I receive an exception on:
>
>
>? System.DateTime.ParseExact("20060607231948.552","yyyyMMddhhmmss", new System.Globalization.CultureInfo("en-US").DateTimeFormat).ToString();
>
>
>What's missing?
>
>Thanks
>Richard
  string result = System.DateTime.ParseExact("20060607231948.552",
   "yyyyMMddHHmmss.fff", 
   new System.Globalization.CultureInfo("en-US").DateTimeFormat).ToString();
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform