473,324 Members | 2,511 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,324 software developers and data experts.

Date and Time question

Hi all,

I have the below code for sending e-mail:
oMailMessage.Subject = Now.Date.ToString() & " " & Now.DayOfWeek.ToString() & " XYZ"
From some reason the time portion of the Date shows all the time the 12.00:00 AM instead of the real time.

Any idea?

Thanks,

Joe

Mar 8 '07 #1
2 978
Use

Now.ToString() instead of Now.Date.ToString()

Now.Date creates a new DateTime object based oin the current DateTime, but
without the time part
--
Teemu Keiski
AspInsider, ASP.NET MVP
http://blogs.aspadvice.com/joteke
http://teemukeiski.net

"JoeP" <DF****@hotmail.comwrote in message
news:eH**************@TK2MSFTNGP04.phx.gbl...
Hi all,

I have the below code for sending e-mail:
oMailMessage.Subject = Now.Date.ToString() & " " & Now.DayOfWeek.ToString()
& " XYZ"
From some reason the time portion of the Date shows all the time the
12.00:00 AM instead of the real time.
Any idea?
Thanks,
Joe

Mar 8 '07 #2
Ok Thanks.

Mar 8 '07 #3

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

Similar topics

7
by: What-a-Tool | last post by:
How does the expire date work setting it server side with asp. I know with javascript setting it client side it will be set to the clients local time, and therefore expire when the clients local...
2
by: mirza i | last post by:
thanks for the previous replies. here is the new question (i'm absolutely sure that this should be VERY easy for a good js coder) ok: from asp i call: <img src="pics/cal.gif"...
6
by: Luvin lunch | last post by:
Hi, I'm new to access and am very wary of dates as I have limited experience in their manipulation and I know if they're not done properly things can turn ugly quickly. I would like to use a...
9
by: Martin | last post by:
I'm retrieving some records from a database. One of the fields contains a date/time. I would like to format it as I send it out to the table in the displayed page. Can some one please tell me...
6
by: Geoff Cox | last post by:
Hello, at the moment I can add the combined date and time into MySQL using php $dt1 = date("Y-m-d H:i:s"); is it possible to add the date and time separately? I thought it might be
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.