December 6, 201312 yr That's not quite clear. Please provide some background: what is your starting point, and what is your purpose here.
December 6, 201312 yr Author I m trying to find records based on date. I wan tto current date so geth this using get(currentDate)..but its in mm/dd/yyyy format and data are in yyyy-mm-dd format
December 6, 201312 yr Do you mean your "dates" are stored in a TEXT field, in the form of "yyyy-mm-dd? If so, why don't you convert them to real dates, using your file's format of m/d/y - instead of going the other way round? That way you get the full benefits of date manipulations - for example, you can search for dates in a given range. The way you have it now, you would need to do: Enter Find Mode [] Set Field [ YourTable::Textdate; Let ( d = Get(CurrentDate); Year ( d ) & SerialIncrement ( "-00" ; Month ( d ) ) & SerialIncrement ( "-00" ; Day ( d ) ) ) ] Perform Find[]
December 6, 201312 yr Author Thanks.Sorry but actually I want to find records based on timestamp means i want to find only those records which were creaated in last two hours .In this in this if I change format like this Set Variable[$date;Value:Year(Get(CurrentDate))&"-"&Month(Get(CurrentDate))&"-"&Day(Get(CurrentDate))] This in day and months if its value are below 10 then give o/p 6 instead of "06"..
December 6, 201312 yr This in day and months if its value are below 10 then give o/p 6 instead of "06".. Yes, I know it does. Have you tried - or even read - what I suggested?
December 7, 201312 yr Also check your System region, date and time format settings. What would this check be looking for?
December 7, 201312 yr I had a thought that perhaps the system date format might have been sett to mm/dd/yyyy. Yesterday a run time wouldn't accept the way I was inputting a date. Upon checking my system settings I found they had changed. Reading this thread back this is likely not related to th op's problem.
Create an account or sign in to comment