Convert Date

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
morgentb
Posts: 4
Joined: Tue Oct 10, 2017 12:44 pm

Convert Date

Post by morgentb » Tue Sep 07, 2004 3:41 pm

Can someone tell me if there is a way to have the report always use a Saturday date? In other words, I have a date field and I need the report to always use the Saturday date for the week that the date falls in. (date is 8/29/2004 and I need it to read 9/4/2004)

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

=> RE: Convert Date

Post by kfleming » Wed Sep 08, 2004 6:24 am

DATEFLD+(7-dow(DATEFLD)____where DATEFLD is your date field will return the next Saturday date.____Kathleen__R&R Support

morgentb
Posts: 4
Joined: Tue Oct 10, 2017 12:44 pm

==> RE: Convert Date

Post by morgentb » Wed Sep 08, 2004 9:15 am

This worked Great!!__Thanks

Marinaneula
Posts: 0
Joined: Fri Apr 13, 2018 4:59 am

===> RE: Convert Date

Post by Marinaneula » Fri Sep 10, 2004 1:41 pm

Kathleen,____If the database stores the date data in GMT format. Is there a function in R&R similar to oracle new_time that converts the GMT date say to PST?____Also, is there a function to convert to daylight saving time?____Thanks

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

====> RE: Convert Date

Post by kfleming » Fri Sep 10, 2004 3:31 pm

You would need to create a user defined function. There is not one built into the product.____Kathleen__R&R Support

Marinaneula
Posts: 0
Joined: Fri Apr 13, 2018 4:59 am

=====> RE: Convert Date

Post by Marinaneula » Mon Sep 13, 2004 1:26 pm

Kathleen,____I am sure that other customers encountered this problem. I am not familiar and have not used the user function. I read in the help files but it was not straight forward. Would it be better if you can show us how you will create this function?__Do you look in a given year for the starting and ending date for daylight savings time and then do the math?____Daylight savings starts on first sunday of April to last Sunday of October. Since we are in PST, To convert from GMT to PST is to subtract 8 hours if not daylight or subtract 7 hours if you are in daylight savings time. ____I envisioned to have a function where you pass a date and it will tell me to subtract 7 hours or 8 hours.____Thanks,____Bert

Marinaneula
Posts: 0
Joined: Fri Apr 13, 2018 4:59 am

======> RE: Convert Date

Post by Marinaneula » Mon Sep 13, 2004 3:19 pm

Kathleen,____I was able to get the user function working.____Another issue came up... how do you enable the user function so other users can avail of the new function I created. We only send an *.rss file to the users and it is complaining that the calculated field XXX must be edited. ____Do we have to manually distribute the rsw.udf to each user and copy to their arpeggio directory? Is there a network option?______

kfleming
Posts: 5795
Joined: Tue Oct 10, 2017 12:44 pm

=======> RE: Convert Date

Post by kfleming » Mon Sep 13, 2004 8:39 pm

You do neeed to distribute your UDF file to the users.____Kathleen__R&R Support

Post Reply