473,434 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,434 software developers and data experts.

how to make "12/02/2016 6:00" as "12/02 6:00" thanks! ;)

23
how to make "12/02/2016 6:00" as "12/02 6:00" thanks! ;)
Sep 1 '16 #1

✓ answered by zmbd

Providing the section of code for this would be helpful.

Personally what I would do is something like:
Expand|Select|Wrap|Line Numbers
  1. (...air code...)
  2. Dim zFoundDate as Date
  3. Dim zString as String
  4. (...)
  5. zFoundDate = functiontofindthedate(withrequireddata)
  6. zString = format(zFoundDate,"MM/DD hh:mm")
  7. (...)

3 876
zmbd
5,501 Expert Mod 4TB
Format Function (syntax)

Format(#12/02/2016 06:00#,"MM/DD h:nn")

Keep in mind the "#MM/DD/YYYY hh:nn#" USA date format is used by Access for VBA functions and take note of the "#" literals

If you pass a variable to the function defined as a date (ether as a field in a table, or via the DIM x As Date the literals are not usually required (ACC will still require the MM/DD/YY hh:nn format); however, a string value will need to include the literals.
Sep 1 '16 #2
ben1988
23
thanks but if i in vba
and now got date variable from function- suppose "startdate"
how i do/write the format function?
thanks
Sep 1 '16 #3
zmbd
5,501 Expert Mod 4TB
Providing the section of code for this would be helpful.

Personally what I would do is something like:
Expand|Select|Wrap|Line Numbers
  1. (...air code...)
  2. Dim zFoundDate as Date
  3. Dim zString as String
  4. (...)
  5. zFoundDate = functiontofindthedate(withrequireddata)
  6. zString = format(zFoundDate,"MM/DD hh:mm")
  7. (...)
Sep 1 '16 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

20
by: Simon Harvey | last post by:
Festive greetings fellow programmers! I've been programming now for about 4, maybe 5 years now. 4 of those years were at university so and I havent had much work experience of making real world...
9
by: Christopher Koh | last post by:
I will make a form which will search the database (just like google interface) that will look/match for the exact name in the records of a given fieldname. Any suggestions on how to make the code?
1
by: Miguel Dias Moura | last post by:
Hello, I have this dataSet created in Dreamweaver: <MM:DataSet id="dsDocuments" runat="Server" IsStoredProcedure="false" ConnectionString='<%#...
6
by: Selden McCabe | last post by:
I have a form with a bunch of image buttons. When the user moves the mouse over a button, I want to do two things: 1. change the Imagebutton's picture, and 2. make another control visible. I'm...
8
by: Scott Emick | last post by:
I am using the following to compute distances between two lat/long coordinates for a store locator - (VB .NET 2003) it seems to take a long time to iterate through like 100-150 locations -...
28
by: Steven Bethard | last post by:
Ok, I finally have a PEP number. Here's the most updated version of the "make" statement PEP. I'll be posting it shortly to python-dev. Thanks again for the previous discussion and suggestions!...
15
by: rizwanahmed24 | last post by:
Hello i have made a custom control. i have placed a panel on it. I want this panel to behave just like the normal panel. The problem i was having is that the panel on my custom control doesnt...
9
by: Confused but working on it | last post by:
Just wanted to say thanks for the posts helping me make ths work. Added a few comments and after the readdir used a pattern match to test for ..jpg, and seems to work fine on my test setup. Maybe I...
9
by: Mourad | last post by:
Hi All, Is it possible to create a Make Table query in access (2.0 and 2003) that creates the table into a SQL Server database? Following the steps: 1- Create New Query 2- Set Query Type as...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.