Convert a string to date datatype

mansied

Member
Local time
Today, 08:19
Joined
Oct 15, 2020
Messages
100
Hello All,
I have field as a string

2022-07-06 01:54:44.000
2022-06-10 20:43:59.609

1- I want to remove after space ( 01:54:44.000)
2- change the 2022-07-06 to date format

how can I do this in Access query ?
Thank you
 
you can also try:

cdate(left$([FieldName],instr(1,[FieldName]," ")))
 
or try this:
Code:
cdate(split([FieldName]," ")(0))

[edit]
Doesn't work in a query.
Create a function which does this and return a date.
[/edit]
HTH:D
 

Users who are viewing this thread

Back
Top Bottom