Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have reports that are emailed to me weekly the field headings are exactly the same. Can I just add it to a folder and then just refresh my APP to included the new file into the app?
The file comes to me as a TXT file. It has two datetimestamps that I am comparing, do I need to convert the files to excel to get the duration in my sheet?
Assuming that text files are having the same structure you should only do following:
or
HTH
Lech
Sorry i missed your second question:
so regarding timestamps it is just important that the are recognized as a timestamps. It would be helpful if you could just provide how they are written in your files, so i can determine what formatting the are having 12 or 24 hrs with AM/PM or without etc...
for now lets assume you have 2 timestamps (to make it more complicated i am just on purpose showing them in 2 different formats)
So in your script you have to make sure that the are read as timestamps in the same formats. You can do following then:
regards
Lech
The file part worked great but the timestamp is well not working any idea?
Hi I guess it just finding what formats are those dates held in. Could you please provide sample data so i can work it out for you?
cheers
How is this?
Well
as you can see format of timestamps in this file is not YYYY-MM-DD but MM/DD/YYYY.
So please change your script for all timestamp fields to something like:
Timestamp(Timestamp#(timestamp1, 'MM/DD/YYYY hh:mm'))
I am ot sure how your time is held there as there is no indication whether it is AM or PM in timestamp field bu you should get away just withi this code
let me know how it goes!
cheers
Still cant get that date thing working?
LOAD
OrderDate,
OrderNumber,
FacilityName,
FacilityID,
RouteNumber,
Timestamp (ScheduledLeaveTime, 'MM-DD-YYYY hh:mm') as ScheduledLeaveTime,
Timestamp (ActualLeaveTime, 'MM-DD-YYYY hh:mm') as ActualLeaveTime
FROM [lib://HealthEX (pharmore_rwinkel)/*.txt]
(txt, codepage is 1252, embedded labels, delimiter is '\t', msq)
Hi
You are missing very important part of Timestamp# statement which is #.
Compare my & yours code.
Timestatmp# converts text to timestamp where Timestamp function without # converts timestamp to format you want to looka at it.
I made example for you - see attached - cheers
Lech