Sep 22, 2004 #1 ludmann Programmer Joined Apr 14, 2004 Messages 49 Location GB Can anyone tell me how to convert DateTime.Now to display in a format 2004-01-20 01:00:00:00 Marika
Sep 22, 2004 #2 Isadore Technical User Joined Feb 3, 2002 Messages 2,167 Location US dtemDate.ToString("u") <--- universal time Upvote 0 Downvote
Sep 22, 2004 Thread starter #3 ludmann Programmer Joined Apr 14, 2004 Messages 49 Location GB Almost, it now displays 2004-2004-01-20 01:00:00Z How can I get rid of Z and display 01:00:00:00 instead? Upvote 0 Downvote
Almost, it now displays 2004-2004-01-20 01:00:00Z How can I get rid of Z and display 01:00:00:00 instead?
Sep 22, 2004 #4 Isadore Technical User Joined Feb 3, 2002 Messages 2,167 Location US lud: See if Jennifer's fine solutin will work: thread855-914441 If it is a simple matter of trimming (Z for Zulu) - Upvote 0 Downvote
lud: See if Jennifer's fine solutin will work: thread855-914441 If it is a simple matter of trimming (Z for Zulu) -
Sep 22, 2004 Thread starter #5 ludmann Programmer Joined Apr 14, 2004 Messages 49 Location GB I will try, but still missing the last two values, although if it is always :00 then it is no problem. Upvote 0 Downvote
I will try, but still missing the last two values, although if it is always :00 then it is no problem.
Sep 22, 2004 #6 Isadore Technical User Joined Feb 3, 2002 Messages 2,167 Location US lud: if it always '00' then you can trim and add, no probelm. Let me know how it works out. Upvote 0 Downvote
Sep 22, 2004 #7 chiph Programmer Joined Jun 9, 1999 Messages 9,878 Location US You can pass a custom format string to the ToString() method: "yyyy-mm-dd hh:nn:ss" Chip H. ____________________________________________________________________ If you want to get the best response to a question, please read FAQ222-2244 first Upvote 0 Downvote
You can pass a custom format string to the ToString() method: "yyyy-mm-dd hh:nn:ss" Chip H. ____________________________________________________________________ If you want to get the best response to a question, please read FAQ222-2244 first