View Full Version : Splitting data


spgprivate
01-06-2009, 09:22 AM
Hi,

New to this forum, regular user of excel but Access is new to me.

How/where can I instruct Access (03) to split the data field that current shows date and time in the format "12/03/2008 20:03:03" ?

Simon

pbaldy
01-06-2009, 09:25 AM
Welcome to the site. I assume you mean for display, as generally it's best to store them together, as that's the nature of the data type anyway. You can either use the Format() function or the DateValue() and TimeValue() functions. You can do it anywhere required; form, report, query, code.

spgprivate
01-06-2009, 10:34 AM
Thanks that works.

This then leads me to my next query...

How to build in a report the summing (total) of a group of data ie by date ? any suggesstions/examples...once i get going im fine but most help material isnt helpfull....

BR
Simon

pbaldy
01-06-2009, 11:08 AM
The help files definitely need help. Getting a total in a report would depend on your specifics. If the report was just the totals, I'd do it in the query underneath the report. That type of query is commonly called a "totals" query, and might look like this:

SELECT DateField, Sum(AmountField) AS TotalAmount
FROM TableName
GROUP BY DateField

which would produce the total amount by date.

spgprivate
01-06-2009, 11:46 AM
thanks again, simple when you know how and made easy for newbies lke me with clear examples as above, ta again.

pbaldy
01-06-2009, 12:00 PM
No problem Simon; post back if you get stuck.