How to update old data/records: From data without symbols in input mask' to data with symbols in the input mask' (1 Viewer)

MicroAbdel

New member
Local time
Today, 12:20
Joined
Aug 9, 2020
Messages
26
Hi guys;
I face a big problem today :p ; i have a database with bunch of data stored with input mask "option save data without symbols for example mask is 0000/2020 and data will stored if user entre something, data will be : 12002020" the main problem i want to change old records to the new option "data : with symbols ";0;" like 1200/2020"
I have no problem with new records to be stored with this new option but problem with old records/data!
if there is anyway to update the old data or not :/ if i can please help me out of this!
Thanks you!
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 12:20
Joined
Aug 30, 2003
Messages
36,125
You could use an update query. Concatenate the left 4 digits, the slash, and the right 4 digits.
 

isladogs

MVP / VIP
Local time
Today, 20:20
Joined
Jan 14, 2017
Messages
18,217
Does the data always follow that pattern? If so, use an update query to update your field name to
Code:
Left(FieldName,4)& "/" & Mid(FieldName,5)
 

MicroAbdel

New member
Local time
Today, 12:20
Joined
Aug 9, 2020
Messages
26
You could use an update query. Concatenate the left 4 digits, the slash, and the right 4 digits.
Thanks! please which function i need to use , my exact input mask is : 99990000/2000? , please any idea 💡 🙏
 

MicroAbdel

New member
Local time
Today, 12:20
Joined
Aug 9, 2020
Messages
26
Colin gave you the fish, just adjust for the number of digits.
bro i have no idea how to do that :/ what i need to use in "update to" field : function or something else!
please help
 

MicroAbdel

New member
Local time
Today, 12:20
Joined
Aug 9, 2020
Messages
26
Does the data always follow that pattern? If so, use an update query to update your field name to
Code:
Left(FieldName,4)& "/" & Mid(FieldName,5)
please i don't want to lose my data , please help me out with this excat input mask thank you so much <3 : 99990000/2000?
 

MicroAbdel

New member
Local time
Today, 12:20
Joined
Aug 9, 2020
Messages
26
THANK YOU GUYS! i fix it using this function : Mid([P_Reservations]![P_ReservationID],1,8) & "/2" & Mid([P_Reservations]![P_ReservationID],9,16)
 

isladogs

MVP / VIP
Local time
Today, 20:20
Joined
Jan 14, 2017
Messages
18,217
THANK YOU GUYS! i fix it using this function : Mid([P_Reservations]![P_ReservationID],1,8) & "/2" & Mid([P_Reservations]![P_ReservationID],9,16)
Pleased to see you worked it out.
For info, the first part of your expression (its not a function) is equivalent to Left([P_Reservations]![P_ReservationID],8)
 

Users who are viewing this thread

Top Bottom