Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

date/time field splitting

Posted on 2002-03-04
5
131 Views
Last Modified: 2010-05-02
Hello

I have created a outlook form to be used within a organisation and the form is sent to a database system.

I have a date/time field on my form.  When the user fills in the form only the date will appear.  Thats what i want.

Although when the e-mail is recieved by the database system, the date and time field is displayed.

My code is in VBScript
I have also looked in the all web sites, they have been no help

Thank you
0
Comment
Question by:BUKI
5 Comments
 
LVL 6

Expert Comment

by:sharmon
ID: 6840505
When you assign the form field to the date variable before you send the mail, use the DateValue() function and it will only return the date portion.

For example...

Dim dteDate As Date
dteDate = DateValue(Now)

Regards,
Shannon

0
 
LVL 6

Expert Comment

by:sharmon
ID: 6840509
Ah, overlooked the database portion, what database are you using?

Regards,
Shannon
0
 
LVL 17

Accepted Solution

by:
inthedark earned 30 total points
ID: 6840674
In VBScript you can use a function called Date().  The date function returnds the current date.

e.g.

Dim ThisDay

ThisDay = Date


In fact Dates are stored as numbers the integer part of the number is the date and the decimal part of the number is the time.

Therefore the following statements are true:

Date = Int(Now)

Now = Date + Time

(The Time functions returns the current time.)

Hope this helps.

In the Database system there is a problem they are not formating the dates correctly.

In Access they can set up a default format for this field, but they have not done this.

To correct the problem they can either create a format for this field or run a query like:

Update YourTable Set YourDate = Int(YourDate)



0
 
LVL 12

Expert Comment

by:guidway
ID: 7306144
This question appears to have been abandoned. A Moderator will be asked to
close this question after seven days, with the following recommended
disposition:

Points to inthedark

If you have any comment or objection to the recommendation, please leave it here.

guidway
EE Cleanup Volunteer
0
 
LVL 5

Expert Comment

by:Netminder
ID: 7331584
Per recommendation, force-accepted.

Netminder
CS Moderator
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question