Date problem

  • Thread starter Thread starter Pradeep
  • Start date Start date
P

Pradeep

I have an input box which takes date as an input. The code after
taking the input updates a linked table and then prints out a report.
If i pass the date as mm-dd-yyyy it show me the report but the data
does not get updated. And if i take the input as dd-mmm-yyyy it
updates the table but the report is empty. I am not sure whats the
problem. I tried each and every permutations and combinations possible
but the effect remains the same. At present i am executing the process
twice once for the report and once for the updation.

Have anybody experienced such kind of problem. Any help is
appreciated.

thanks
 
I have an input box which takes date as an input. The code after
taking the input updates a linked table and then prints out a report.
If i pass the date as mm-dd-yyyy it show me the report but the data
does not get updated. And if i take the input as dd-mmm-yyyy it
updates the table but the report is empty. I am not sure whats the
problem. I tried each and every permutations and combinations possible
but the effect remains the same. At present i am executing the process
twice once for the report and once for the updation.

Have anybody experienced such kind of problem. Any help is
appreciated.

thanks

format the input in US-Dateformat

format(Input,"\#mm\/dd\/yyyy\#"
 
You may need to manipulate or format the date in the code depending on what
you're trying to do. To use the date as criteria in a query, it needs to be
in US format. If you are storing the dates differently though, it probably
needs to be in your local's format for storage. One way around this is to
make the date unambiguous. Instead of mm/dd/yyyy or dd/mm/yyyy, try breaking
the input down using the DateSerial function to pass the date or format the
date so that the month is spelled out (i.e. 3 Dec 2004). This will make it
obvious which value is the date and which is the month.
 
Back
Top