I am trying to convert a string to datetime format and I get an invalid
Date/Time format error. The code I am trying to use is:
msgtime = CDate("Sat, Aug 27 2005 20:00:00 EDT")
I know I can use this format to generete a valid date but how do I correctly
covert time zones?
msgtime = CDate("Sat, Aug 27 2005 20:00:00 GMT")
Any help would be greatly appercaited.
Thanks,
Curtis 3 2161
Curtis,
If you use a datestring, than it has to be in the culture of the computer or
you have to set the culture (something I will not advice you except if you
directly set it back).
Therefore every datetime string is in almost every country in the world
different.
Is this a valid datetime string in your culture?
You know that the most nice method to get a date is using the ISO date with
new date
dim dtm as datetime = new date(2005,9,1,12,18,00)
I hope this helps,
Cor
Cor,
Thanks for the reply, so if I understand you correctly their is no way that
VB will convert times from different time zones ? My application has to
process time zones that are in the United States so does that mean I have to
process the time difference manually?
Thanks,
Curtis
"Cor Ligthert [MVP]" <no************@planet.nl> wrote in message
news:us**************@TK2MSFTNGP15.phx.gbl... Curtis,
If you use a datestring, than it has to be in the culture of the computer or you have to set the culture (something I will not advice you except if you directly set it back).
Therefore every datetime string is in almost every country in the world different.
Is this a valid datetime string in your culture?
You know that the most nice method to get a date is using the ISO date with new date
dim dtm as datetime = new date(2005,9,1,12,18,00)
I hope this helps,
Cor This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: David Graham |
last post by:
Hi
I have asked this question in alt.php as the time() function as used in
setcookie belongs to php - or does it belong equally in the javascript
camp - bit confused about that. Anyway, can anyone...
|
by: Bruce Cushman |
last post by:
My DB is Access 2000 based "possibly written in 2002" and I have to send and
receive update files, ported to a UNIX server by FTP, DB unknown.
The file content uses a fixed length string, zero...
|
by: Mark Reed |
last post by:
Hi Guru's,
I have created a database to monitor hours I have worked as our payroll
department are so crap. I work nights most of the time but occasionally I
have to work on days. Between the hours...
|
by: Claus Haslauer |
last post by:
Hi,
I want to create a chart
value (y-axis) vs. time (x-axis). In fact very similar to the
xy(scatter) example in the graph10.chm help-file.
I ran into problems, so I started a very basic *.mdb...
|
by: Edward Mitchell |
last post by:
I have a number of DateTimePicker controls, some set to dates, some set to a
format of Time. The controls are all embedded in dialogs. I created the
controls by dragging the DateTime picker from...
|
by: Shimon Sim |
last post by:
I have a custom composite control
I have following property
|
by: Khurram |
last post by:
I have a problem while inserting time value in the datetime Field.
I want to Insert only time value in this format (08:15:39) into the SQL
Date time Field.
I tried to many ways, I can extract...
|
by: Dixie |
last post by:
How can I programatically, take some Date/Time fields present in a table in
the current database and change their type to text?
dixie
|
by: Jerome |
last post by:
Hallo,
I know a lot has already been told about date/time fields in a database but
still confuses me, specif when dealing with SQLserver(Express).
It seems that sqlserver only accepts the date in...
|
by: WebCM |
last post by:
There is a function: http://paste.ubuntu.com/21865
It needs GMT date in YYYY-MM-DD HH:MM:SS format - in SQL: datetime. If date is the same as today, the function returns "Today". There
is one...
|
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
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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,...
|
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...
|
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: 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: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |