473,396 Members | 1,756 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,396 software developers and data experts.

How to get the dateformat (yyyymmdd)

e.g my date is 02-02-2005
now, How can I get the format into 20050202 ??
thanks a lot
Btw, As i remember, there is a web site which let us to search the old post
? (I resinstall my PC, so all the bookmark disappear)
Does anyone know ?
Nov 21 '05 #1
2 41751
Agnes,
I normally use DateTime with a custom date format, something like:

Dim theDate as DateTime = #02/02/2005#

Dim ymd As String = theDate.ToString("yyyyMMdd")

Note MM is month in the custom format, while mm is minutes.

For details on custom datetime formats see:

http://msdn.microsoft.com/library/de...matstrings.asp

For information on formatting in .NET in general see:
http://msdn.microsoft.com/library/de...ttingtypes.asp

Hope this helps
Jay

"Agnes" <ag***@dynamictech.com.hk> wrote in message
news:ed****************@TK2MSFTNGP10.phx.gbl...
e.g my date is 02-02-2005
now, How can I get the format into 20050202 ??
thanks a lot
Btw, As i remember, there is a web site which let us to search the old
post ? (I resinstall my PC, so all the bookmark disappear)
Does anyone know ?

Nov 21 '05 #2
Agnes,

You can be often so documentive :-) the date you show is in every format in
the world 2 february 2005

And than is this about a date presented in a string or in a datetime (which
is for every format the same because it are nanosecondticks)

The link
http://groups-beta.google.com/group/...n&lr=&ie=UTF-8

Cor
Nov 21 '05 #3

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

Similar topics

2
by: hikums | last post by:
Hello, If I export a file containing date field, export to "/james/j.txt" of DEL select a1,adate from a The date is represented in YYYY/MM/DD format as expected. Output I need is to be in...
0
by: Phil | last post by:
My regional setting (on Win2000) is: (General Tab)Locale = English (US) (Date Tab), short date = MM/dd/yy When I ask .Net DateFormat.ShortDatePattern, I get MM/dd/yyyy Now, where does the...
4
by: newtophp2000 | last post by:
Hello, I receive a file containing some character fields along with a date. The date values in the file are formatted as "dd/mm/yy", that is 2-digit day, 2-digit month, and 2-digit year. The...
10
by: rob | last post by:
I have a class that among others exposes a string property "Date". The date in this property is stored in the form yyyymmdd. Now I do the following 1) Generate a DataGridViewTextBoxColumn column...
0
by: pankajol82 | last post by:
Hi all I am using following code to change regional setting at run time its not giving any error but at the same time the format of date is not changing. Dim DateFormat As New...
5
by: Konstantinos Pachopoulos | last post by:
Hi, does any body now any such algorith? to find difference in days from YYYYMMDD to YYYYMMDD? Or just an algorithm, that converts YYYYMMDD to seconds since the epoch? Thanks
3
by: YSpa | last post by:
Hi, I'm using SQL-Server Express 2005 on Windows XP Prof. and after working properly for some time my asp.net application suddenly gave the error that my DateFormat wasn't accepted while using...
1
zigman68
by: zigman68 | last post by:
I have a problem with the DateFormat() Function that is driving me nuts! I am downloading a csv and then parsing through it, then inserting into a SQL 2005 DB. Here is the problem. ... A number of...
3
dzenanz
by: dzenanz | last post by:
String input="4/3/08 9:57 AM"; DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT); StartDate = df.parse(input); out.println(StartDate.toLocaleString());//"Apr 3, 2008 12:00:00 AM" ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.