![]() |
|
|
#1
|
|||
|
|||
|
Hi everyone,
I am in need of help converting a string yymmdd (ex: 080907 = Sept 7, 2008) to a date format as dd/mm/yyyy. I need to do this in a query or visual basic code? |
|
#2
|
||||
|
||||
|
Have you tried using the Mid() function?
|
|
#3
|
|||
|
|||
|
Yes, I ended up using
CDate(mid([date],24),left([date],2),right([date],2)) to format it to mm/dd/yy then short date format on filed property to make it mm/dd/yyyy |
|
#4
|
||||
|
||||
|
Glad you got it sorted. BTW, using date as a field name can be problematic since it is a reserved word. http://www.allenbrowne.com/AppIssueBadWord.html
|
|
#5
|
|||
|
|||
|
Lol, I have learned that the hard way. It is actually named nDate.
Thanks! |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Extract numbers from text string strored in a field. | khabdullah | Programming | 2 | 12-23-2007 03:55 PM |
| Creating a string from all records in a table | ocordero | Programming | 2 | 08-07-2006 07:21 AM |
Make sure end date is one year greater than start date
|
AimeeK | Forms | 1 | 12-09-2005 07:29 PM |
| How can I get a Expression in a String to A Query? | Willot | Programming | 0 | 12-05-2005 01:09 AM |