UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> DATE/TIME    
 
   
ericaanderson
post Jan 11 2006, 03:39 PM
Post #1

New Member
Posts: 2



I have a table with a filed that is formatted date/time. I need to split this column into one date column and one time column. I've tried to do this through properties and setting the columns to short date and short time respectively. But this appears to be a display option only. The underlying data is still date/time. Essentially, I want to deconcatenate the field. Any help would be appreciated.
Go to the top of the page
 
+
freakazeud
post Jan 11 2006, 03:41 PM
Post #2

UtterAccess VIP
Posts: 31,413
From: NC, USA



Hi,
why do you want to do that. You can just pull the values apart if you want with:

DateValue([YourField])

OR

TimeValue([YourField])

HTH
Good luck
Go to the top of the page
 
+
fkegley
post Jan 11 2006, 03:43 PM
Post #3

UtterAccess VIP
Posts: 23,583
From: Mississippi



In a query, use the DateValue and TimeValue functions to isolate each part.

You're probably not going to be able to do this to the value in the table, as I believe, check me on this, a Date will always have a time and vice versa, that's why the field is type Date/Time.

You can tho, do as I have suggested.
Go to the top of the page
 
+
truittb
post Jan 11 2006, 03:44 PM
Post #4

Retired Moderator
Posts: 13,544
From: Texas (Is there anywhere else?)



A datetime datatype stores dates as a double precision number the whole number is the date and the decimal is the time.
What you need to do is use the built-in Access functions to display the dat and the time as you want it and leave the table with the actual date.

You can use the Format() format function to do what you want.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 21st May 2013 - 07:26 AM