Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Correct formatting for this control source?

Posted on 2011-02-18
2
Medium Priority
?
260 Views
Last Modified: 2012-05-11
Hi there,

What is the correct formatting for this control source?

="Date: " & [Date] & " Time: " & [Time]

I want to add formatting so the date is dd/mm/yyyy & the time is hh:mm:ss

At the moment the current control source returns

Date: dd/mm/yyyy hh:mm:ss & Time: dd/mm/yyyy hh:mm

Thanks

Chris
0
Comment
Question by:smods
[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 9

Accepted Solution

by:
borki earned 1000 total points
ID: 34924789
Are [Date] and [Time] two distinct fields of datatype Date/Time?

="Date: " & Format([Date], "dd/mm/yyyy") & " Time: " & Format([Time], "HH:Nn:SS")

Or is there a single filed and you just want to display it in the above format?

="Date: " & Format([DateValue], "dd/mm/yyyy") & " Time: " & Format([DateValue], "HH:Nn:SS")
0
 

Author Comment

by:smods
ID: 34924803
Two distinct fields my friend!

Thank you very much :)
0

Featured Post

 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

610 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