var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Query in design view-add "19" to front of number
Hey...I'm not as familiar with Access as I should be. I think this is simple, just can't figure out how to do it.
I'm doing a query in design view. I have some 2 number years...83, 94, etc. I want to add "19" in front of them. So "83" becomes "1983", and "94" becomes "1994", etc.
How would I do my update query so it will add the 19 to the front of each field?
Thanks for any help!
Do you want text, date or number as the result?
Also important: what is the current format of the data, text or number?
These assume YourField is a number:
For a text result:
YourResult: "19" & Format([YourField])
For a number result:
YourResult: 1900 + [YourField]
For a date result, you'll need more than just the year as a date includes the month and day:
YourResult: Date("Jan 1, 19" & Format([YourField]))
hope this helps,
Darn it, I knew I should have mentioned the type of field.
It's a text field, actually.
I'll try "19" & Format([YourField]) and see what happens. I think that will work, looking at it.
Awesome. It worked.
Thank you! I knew it was something simple.
Edit: new, knew, gnu . Don't cha love typos?
Last edited by domini; 04-18-06 at 17:42.
PS: if the field is text, and you don't mind getting text as your result, then:
"19" & [YourField]
will work fine (the Format function converts a number to text, and since it's text already, the function isn't needed).