Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Excel date convert problem

Posted on 2008-10-07
2
Medium Priority
?
418 Views
Last Modified: 2008-10-07
I have one column in excel 2007 in the format of m/d/yyyy h:mm, but I'm trying to run query to group results to days. That means I want to eliminate time for that column. What should I do ?
Although I can change the format directly to m/d/yyyy, but the query GROUP BY dates will still group results to hours.

Thanks
0
Comment
Question by:CodingCat
[X]
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
2 Comments
 
LVL 93

Expert Comment

by:Patrick Matthews
ID: 22663302
If the query is running in SQL Server...

SELECT CONVERT(datetime, CONVERT(varchar, DateColumn, 102)) AS TheDate, SUM(Something)
FROM SomeTable
GROUP BY CONVERT(datetime, CONVERT(varchar, DateColumn, 102))
0
 
LVL 35

Accepted Solution

by:
David Todd earned 2000 total points
ID: 22664626
Hi,

In excel use the trunc() function

in a3 put
=NOW()

in b3 put
=TRUNC(A3, 0 )

Format the results as appropriate ...

Cheers
  David
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

670 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