Date problem (1 Viewer)

Ironis

Learning Member...
Local time
Today, 17:28
Joined
Oct 10, 2002
Messages
61
I want some queries to automatically look at the current date.
I hqve some fields, which are text fields with the input mask:

99"-"99"-20"00;0;
dd - mm - yyyy

I want the system to find the current dat in this format, and then only show the reservations AFTER and ON the date of today, but I can't figure it out.

One of the queries looks like this:

SELECT tblReservation.dat, tblReservation.programcode_ID, Sum(tblReservation.number_pers) AS Total, tblPrograms.program_name, Count (tblReservation.redervatiunnumber_ID) AS [# Reservations]
From tblPrograms RIGHT JOIN tblReservation ON tblPrograms.Programcode_ID = tblReservation.Programcode_ID
GROUP BY tblReservation.date, tblReservation.programcode_ID, tblPrograms.program_name;

With this query, I want to see al reservations, sorted by date, which show Date, name program, number of people and number of reservations.
Currently it shows all dates, but I want it to show all dates from now, including today.. I tried some code, but it doesn't work.

Maybe the solition is something with using a date/time field instead of a text field, but then I can't use the date format dd-mm-yyyy
Please help me out on this one!
 

Ironis

Learning Member...
Local time
Today, 17:28
Joined
Oct 10, 2002
Messages
61
I've got the US version of Access, I have to make an imput mask my own, but then still I get the US date layout, mm/dd/yyyy
Maybe I can figure the date problem, but still not the automated check...
 
D

DJN

Guest
The simplest solution is to change the text field to data/time. You can format the field in the underlying table. In the format field of the date/time field add dd/mm/yyyy. I would suggest that you add an additional date/time field to the table. Add the dates, then you can delete the original text field and then rename the newly created date/time field to the original text field name.


David
 

Ironis

Learning Member...
Local time
Today, 17:28
Joined
Oct 10, 2002
Messages
61
Done that, and still using an input mask 99\-99\-0000;;_
But, now when I type 02-03-2002, (2 apr 2002) Access changes it to 03-02-2002, so it thinks my input is in the mm-dd-yyyy format, but I want dd-mm-yyyy becouse I use this format, and not for access to alter. I can't find how access will not change this. I tried AutoCorrection "no" on that field, but it doesn't work.

Suggestions?

(My windows settings are US, and so are all of the computers here which will run the DB, so I need a solution for this, becouse they use the dd-mm-yyyy format)
 

Users who are viewing this thread

Top Bottom