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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Changing date Data

Status
Not open for further replies.

techkenny1

Technical User
Jan 23, 2009
182
AU
Hi all,
I have been trying to understand the date formatting in access.
Below is a part of my code for copying date data to another table.
"', #" & [Forms]![frmStaffScheduleInput]![Day1] & "#, #" & [Forms]![frmStaffScheduleInput]![Day2]....

but when it copies the date it copies it in the US format. I have read Allan Browns info, but am not able to completely understand how to change this date in the above code so that when a date is copied it copies in the Australian format.
Any help would be appreciated.

Many thanks,

KP
 
How are ya techkenny1 . . .

In table design view of the table you copy too, set a custom date format for the field. I believe the Australian format is [blue]day/month/year[/blue]. So in the [blue]General[/blue] tab on the [blue]Format[/blue] line you'd enter:
Code:
[blue]d/m/yyyy[/blue]


See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
TheAceMan1,

Many thanks for your reply. I did do as you had suggested.
Now here is what I have found. If you put a date say from 1/1/09 to the 12/1/09 the copied date into tbl2 is in the m/d/yy format.
If you put any date from 13/1/09 to 31/1/09 then the date copied into tbl2 is in the d/m/yy format.This happens for any given month.
Does this sound crazy???

Many thanks,KP
 
techkenny1 . . .
and if you change the code in your post origination to the following:
Code:
[blue]   '"', #" & Format([Forms]![frmStaffScheduleInput]![Day1],"d,m,yyyy") & "#, #" & Format([Forms]![frmStaffScheduleInput]![Day2],"d/m/yyyy")....[/blue]
... what do you get! [surprise]

See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top