July 9, 200421 yr This is my situation at the present moment. In my database I have a single date field that reads as such 7/09/2004, then I have three new date fields, one for the month, day, and year. I need to convert the information in the old date field, into the three new date fields for 16,000 records. Any info would be greatly appreciated!
July 9, 200421 yr Are your three new date fields defined as true date fields? Or are they number or text fields? Is the original single date field defined as a true date field? In general, assuming this is a one-time data fix, I would run three replace-with-calculations on your three target fields. Each one would have a calculation that specified exactly which part of the data in the originating field is to be replaced into the target field. For example, the calculation for the year would be: Right(OriginalDateField, 4) Picking out the month and day depends on how the fields are defined, as per my opening questions. Warning: Back up data first, and experiment on a clone with a couple dozen records. The replace function cannot be undone. Steved Brown
July 9, 200421 yr Author The three new date fields are defined as text, and the original single date field is defined as true date field.
July 10, 200421 yr Use The Shadow's functions, embedded in a DateToText function to replace the info into your text fields (you may not need this, but it couldn't hurt): DateToText(Month(dateField)), etc. Steve Brown
July 10, 200421 yr What are you going to DO with these fields? If it's just for display purposes, you don't need to do any of this. You can just take the data field, copy it 3 times across your layout, and set the date options to display just what you asked for with the format:date format: custom option.
Create an account or sign in to comment