Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report date formatting issue? 1

Status
Not open for further replies.

ajayg

Programmer
Oct 24, 2000
7
US
I have a report which receives the Date in string format (MM/dd/yyyy).

I want to convert this in (dd/MM/yyyy). How should I do it?

I tried the ToText, DateValue techniques, it does not give me consistent result, per say:
expected Result 12/8/2008 shows up as 8/12/2008 , where as 13/8/2008 and onwards come up correctly.

Help needed urgently.

Thanks in advance.
Cheers,
AG
 
You should be able to use:

totext(date({table.stringdate}),"dd/MM/yyyy")

-LB
 
If it's a string you have to parse it and put it back together.

MID({table.field},4,2)+"/"+LEFT({table.field},2)+"/"+RIGHT({table.field},4)
 
Not necessarily. In some cases, a string date will convert directly to a date by wrapping it in date(). It works for the format "MM/dd/yyyy".

-LB
 
Thanks for your Post/responses. It fixed my problem.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top