Splitting Date/Time values

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to split data in a column that is date/time. The data will be imported
into an application and the import specifications require one date field and
one time field, not combined values. Does anyone have a programmatic method
of solving this? Or can anyone point me to additional resources?

Thanks
 
You don't need any code at all to do this.

Just build a query, and add and admiral column in the query builder like:


MyTime:format([YouTimeDateField], "HH:MM am/pm")

You can of course choose 24 hour format...or whatever.

Now, just base your export, report or whatever on the above query you
build..and you got a separate field call MyTime to use as you please.
 
I need to split data in a column that is date/time. The data will be imported
into an application and the import specifications require one date field and
one time field, not combined values. Does anyone have a programmatic method
of solving this? Or can anyone point me to additional resources?

Thanks

You can put two calculated fields in your Query:

DateOnly: DateValue([datetimefield])
TimeOnly: TimeValue([datetimefield])

and export that.

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Brett S. said:
I need to split data in a column that is date/time. The data will be
imported
into an application and the import specifications require one date field
and
one time field, not combined values. Does anyone have a programmatic
method
of solving this? Or can anyone point me to additional resources?

Thanks

Could you not use a query which makes use of the format function? E.g.

SELECT MyID,
Format(MyDateTime,"mm/dd/yyyy") As MyDate,
Format(MyDateTime,"hh:nn:ss") As MyTime
FROM MyTable
 
Bas Cost Budde said:
Just curious: what's an admiral column?

It is a magical term that gets created by typing too fast, and with some
help of the spell checker!!

Somehow the word additional became admiral!


and admiral

an additional
 
It is a magical term that gets created by typing too fast, and with some
help of the spell checker!!

Somehow the word additional became admiral!


and admiral

an additional
LOL

I never check the speling of my mails. :-)
 
Back
Top