473,408 Members | 1,772 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,408 software developers and data experts.

Formatting Date As YYYY-MM instead of YYYY/MM?

I'm currently presenting certain dates as YYYY/MM because Day=01 is understood.

YYYY-MM, however, looks cleaner to my eye.

But I can't get it to work with both .Format and .InputMask. They seem to
conflict when it's time to save the field's value and an "Illegal format"
message pops.

Anybody managed to pull this off, or am I fighting nature?
--
PeteCresswell
Nov 13 '05 #1
2 1711
(PeteCresswell) wrote:
I'm currently presenting certain dates as YYYY/MM because Day=01 is understood.

YYYY-MM, however, looks cleaner to my eye.

But I can't get it to work with both .Format and .InputMask. They seem to
conflict when it's time to save the field's value and an "Illegal format"
message pops.

Anybody managed to pull this off, or am I fighting nature?


I created a table with DateField, type Date. I created a form with
DateField as a control. I put in 0000\-00;0;_ as the input mask and
yyyy-dd as the format and it seems to work OK.

I didn't put in the Input mask, just the format, and entering 2005-10
works OK too.

Usina A97
Nov 13 '05 #2

In a form, I tend to use a unbound field, then set the day = 1 to the
bound field in the before update event.

I convert back in the Form Current event for those people who like to
"scroll" through the records.

For what it's worth, I don't bother with Input Masks _ever_. If
memory serves, Allen Browne has a page on his site on the pitfalls of
using Input Masks. Certainly worth a view (or two!).


On Thu, 27 Oct 2005 12:30:01 -0700, "(PeteCresswell)" <x@y.Invalid>
wrote:
I'm currently presenting certain dates as YYYY/MM because Day=01 is understood.
YYYY-MM, however, looks cleaner to my eye.
But I can't get it to work with both .Format and .InputMask. They seem to
conflict when it's time to save the field's value and an "Illegal format"
message pops.
Anybody managed to pull this off, or am I fighting nature?

--
Drive C: Error. (A)bort (R)etry (S)mack The Darned Thing

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jouke Langhout | last post by:
Hello all! For quite some time now, I've got the following problem: Access won't close properly when a user closes the application. An ACCESS process stays active and that process can only be...
2
by: Sara | last post by:
The problem: Conditional formatting bold, red when field Value < date() sets the field background to white - always - whether condition is met or not. I want the field unfilled and just red/bold...
7
by: Matthew Wieder | last post by:
Hi - I have a datagrid that has a black header and the rows alternate white and gray. The problem is that until items are added to the grid, the grid appears as a large black rectangle, which is...
4
by: Nalaka | last post by:
Hi, I have two questions about gridViews. 1. How can I intercept the row/column values at loading to change values? 2. After I update a row (using default update functionality), how can I...
2
by: Thomas Beyerlein | last post by:
I am binding dates to a textbox, the date is stored in SQL in a datetime field. When it gets bound it turns it into a long date (Sunday, Dec. 25 2005), in SQL when viewing the table it views as a...
2
by: David Veeneman | last post by:
How does one format a date column in a GridView control? I had assumed that the DataFormat string would do it, but MSDN only shows numeric formatting codes. Can dates be formatted using that...
2
by: OdAwG | last post by:
Hello Again Access GURU's, Need some help with Conditional Formatting and datediff. What I am trying to do is the following: I have three text boxes with dates in them and what I want to do...
4
by: Ken Wigle | last post by:
All, I would be very grateful for any help on this question. I have an application in asp.net 2.0 where I dynamically create a datatable and then bind that to a gridview. Unfortunately, the...
12
by: tarscher | last post by:
Hi all, A simple problem that seems hard to solve... I have a gridview with a date row. <ItemTemplate> <asp:Label ID="Label2" runat="server" Text='<%# Bind("time") %>'></asp:Label>...
4
by: RussCRM | last post by:
I have a subform in datasheet form with the fields Date, Type and Note (sorted by Date). There are 4-5 records generally per date. Is there a way to group them visually somehow by date such as...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.