473,399 Members | 3,302 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

format dateTime '06/08/2003 12:00' to '1 day ago'

Ted
I would like to format my date "06/08/2003 12:00" to something like "1 day
ago" or "24 hours ago". Is there a date format I can use to do this or does
anyone have any pointers as to how i could do this.

Any help much appreciated
Thanks
Ted
Jul 19 '05 #1
1 2746
You can use DateTime.Parse passing your string.
Then you can substract 1 day

José
"Ted" <su*********@flytxt.com> wrote in message
news:e7**************@TK2MSFTNGP09.phx.gbl...
I would like to format my date "06/08/2003 12:00" to something like "1 day
ago" or "24 hours ago". Is there a date format I can use to do this or does anyone have any pointers as to how i could do this.

Any help much appreciated
Thanks
Ted

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Andreas Klemt | last post by:
Hello, I have this Dim myDate As Date ... ... How can I check if this date is empty (value #12.00.00 AM# is in there) ? Thanks,
9
by: Phil B | last post by:
I am having a problem with a datetime from a web services provider The provider is sending the following SOAP response <?xml version="1.0" encoding="utf-8"?> <soap:Envelope...
1
by: Ted | last post by:
I would like to format my date "06/08/2003 12:00" to something like "1 day ago" or "24 hours ago". Is there a date format I can use to do this or does anyone have any pointers as to how i could do...
1
by: Jason Chan | last post by:
DateTime mydate = new DateTime(2006,1,1,0,0,0); string testStr = mydate.ToString("hh:mm:ss"); //return 12:00:00 mydate = new DateTime(2006,1,1,1,0,0) testStr = mydate.ToString("hh:mm:ss");...
5
by: mlafarlett | last post by:
Alright..I've found lots of info on this error and most say assign System.DBNull.Value, System.Convert.DBNull, or System.Data.SqlTypes.SqlDateTime.Null to my stored proc param and the problem will...
20
by: andreas | last post by:
When I copy a vb.net project using date formats from one PC with a windows date format f.e. dd/mm/yyyy to another PC having a format yy/mm/dd then I get errors. How can I change for a while in the...
0
by: Ronald S. Cook | last post by:
When I pass a null date from my client to my service project, it comes across as #12:00:00 AM#. While I can easily code for this, it seems like a hack. Is this normal? I'm using WCF, by the...
0
by: Ranger | last post by:
TRANSFORME R$12,00 EM R$12.000,00 SÓ VAI TOMAR UM POUCO DO SEU TEMPO E VC Ñ VAI SE ARREPENDER ACREDITE!!! LEIA COM ATENÇÃO. MÉTODO APROVADO PELA REVISTA EXAME Você já imaginou ganhar até R$...
0
by: Ranger | last post by:
TRANSFORME R$12,00 EM R$12.000,00 SÓ VAI TOMAR UM POUCO DO SEU TEMPO E VC Ñ VAI SE ARREPENDER, ACREDITE!!! MÉTODO APROVADO PELA REVISTA EXAME Você já imaginou ganhar até R$ 12.000,00 ou mais,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.